406097: GYM102267 B Primes
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
B. Primestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
A prime number is a natural number greater than 1 and has exactly 2 divisors which are 1 and the number itself.
You are given a prime number $$$n$$$, find any 2 prime numbers $$$a$$$ and $$$b$$$ such that $$$a+b=n$$$ or state that no such pair of primes exists.
InputThe input contains a single prime number $$$n$$$($$$2 \le n \le 10^7$$$).
OutputIf there doesn't exist any 2 primes such that their summation is equal to $$$n$$$ then print -1, otherwise print the 2 primes on a single line separated by a space.
ExamplesInput5Output
2 3Input
11Output
-1