Time limit: 1s
Memory limit: 256MB
Input: neprim.in
Output: neprim.out
Task
You are given numbers. Find how many numbers are there in the array which are prime nonprime.
A prime nonprime number is a number such that all of its digits are prime, but the number is not prime.
Input data
The first line of the input file neprim.in
contains , the number of integers from the array. The next line contains positive integers which have at most digits.
Output data
The first line of the output file neprim.out
contains a single integer, the number of prime nonprime numbers from the array.
Constraints and clarifications
- ;
- ;
Example
neprim.in
6
34 23 130 325 777 120
neprim.out
2
Explanation
The two numbers which are prime nonprime in the array are (it is a multiple of ) and (it is a multiple of ).