Congratulations! You are now the judge of a programming contest! You’ve been put in charge of a problem, and since your problem may not have unique correct output, you’ve got to write an output checker for it.

Your problem is called “Good as Goldbach”, and it’s based on the Goldbach Conjecture (that any positive even integer greater than $3$ can be expressed as the sum of two primes). A solving program’s output should have three numbers separated by whitespace: First, a positive even integer greater than $3$ and less than or equal to $10^9$, and then two (positive) prime numbers which sum to the even number.

You must write a checker for this problem. Your checker should take the output of a contestant’s program, and determine whether or not it could possibly be correct. That is, determine if the contestant’s output consists only of three tokens separated by whitespace, the first of which is a positive even integer greater than $3$ and less than or equal to $10^9$, and the next two are positive prime integers which sum to the first. The integers should be in base ten, with no signs or leading zeros. Any amount of white space anywhere except within an integer, including blank lines, is OK. Any other output, extra characters, missing numbers, etc. should be considered incorrect.

-----Input-----
The input will consist of from $0$ to $1000$ lines. Each line consists of from $0$ to $100$ printable ASCII characters (with codes 32 through 126), or tabs.

-----Output-----
Output a single integer, which is $1$ if the input could possibly be a correct output for the “Good as Goldbach” problem, or $0$ if the input could not possibly be a correct output for the “Good as Goldbach” problem.

-----Examples-----
Sample Input 1:
10 3 7
Sample Output 1:
1

Sample Input 2:
10   3   7
Sample Output 2:
1

Sample Input 3:
314
159 265
358
Sample Output 3:
0

Sample Input 4:
22 19 3
Sample Output 4:
1

Sample Input 5:

   60
  
  29
  
      31
          
          
          
          
Sample Output 5:
1

Source: kattis | Difficulty: HARD


Solutions: