#t38. 输出序列中的素数
输出序列中的素数
Primes in a Sequence
Problem Description
Given numbers, print all the primes among them in input order, separated by spaces.
(Terminology: a prime is a natural number greater than that is divisible only by and itself, for example , , .)
Input Format
The first line contains an integer , the number of values.
The second line contains 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