Given a number (greater than 2), print two prime numbers whose sum will be equal to given number, else print -1 if no such number exists.
NOTE: A solution will always exist if the number is even. Read Goldbach’s conjecture.
If [a, b] is one solution with a <= b, and [c, d] is another solution with c <= d, and a < c then print [a, b] only
and not all possible solutions.
The first line contains an integer T, depicting total number of test cases. Then following T lines contains an integer N.
Print the two prime numbers in a single line with space in between.
1 ≤ T ≤ 50
2 ≤ N ≤ 1000000
Testcase 1: two prime numbers from 1 to 8 are 3 and 5 whose sum is 8.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.