#C14267. Product of Prime Numbers

    ID: 43897 Type: Default 1000ms 256MiB

Product of Prime Numbers

Product of Prime Numbers

In this problem, you are given a list of integers and your task is to compute the product of all the prime numbers in the list. A prime number is defined as a natural number greater than 1 which has no divisors other than 1 and itself; that is, it satisfies ( p > 1 ) and for every divisor ( d ) with ( 1 < d < p ), ( d ) does not divide ( p ). If the list contains no prime numbers, output the message No prime numbers found.

inputFormat

The input is given via standard input (stdin). The first line contains an integer ( n ) representing the number of elements in the list. The second line contains ( n ) space-separated integers.

outputFormat

Output a single line via standard output (stdout) containing the product of all prime numbers in the list. If there are no prime numbers, output the string No prime numbers found.## sample

4
3 5 7 11
1155