#t38. 输出序列中的素数

输出序列中的素数

Primes in a Sequence

Problem Description

Given nn numbers, print all the primes among them in input order, separated by spaces.

(Terminology: a prime is a natural number greater than 11 that is divisible only by 11 and itself, for example 22, 33, 55.)

Input Format

The first line contains an integer nn, the number of values.
The second line contains nn integers, the sequence to be tested.

Output Format

Print all the primes among them in input order, separated by spaces. If there is no prime, print nothing.

Sample Input

5
2 3 4 5 6

Sample Output

2 3 5

Constraints

1≤n≤10001 \le n \le 1000
1≤Ai≤10001 \le A_i \le 1000