QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 1024 MB مجموع النقاط: 100 قابلة للهجوم ✓

#18285. Not Prime 4

الإحصائيات

$N$ distinct integers $A_1, A_2, \cdots, A_N$ are placed in front of Changha.

Since Changha has been suffering from prime-number phobia for three years, he wants to select at least two integers from them without repetition so that their least common multiple is not a prime number. Write a program to help Changha out.

Input

The first line contains a single integer $N$.

The second line contains $N$ space-separated integers $A_1, A_2, \cdots, A_N$.

Output

On the first line, print `YES` if it is possible to select integers so that their least common multiple is not a prime number, and print `NO` otherwise.

If there is such a way, print the number of selected integers $K$ on the second line, and the corresponding $K$ space-separated integers on the third line. The order in which the integers are printed does not matter.

If there are multiple solutions, print any of them.

Constraints

  • $2 \le N \le 1000$
  • $1 \le A_i \le 1000$
  • If $i \ne j$, then $A_i \ne A_j$

Scoring

No. Points Constraints
1 20 $N = 2$
2 80 No additional constraints

Examples

Input 1

4
2 5 6 4

Output 1

YES
2
4 5

Input 2

2
3 1

Output 2

NO

Note

In Example 1, the least common multiple of $4$ and $5$ is $20$, so choose $4$ and $5$. The least common multiple of $2$, $4$, and $6$ is $12$, so it is also possible to choose $2$, $4$, and $6$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.