Express N as sum of 4 prime numbers
Submissions: 338   Accuracy:

31.05%

  Difficulty: Easy   Marks: 2

Given a number N, the task is to express N as a summation of 4 positive primes.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a number N as input.

Output:
For each test case, print four positive primes in increasing order. If it is not possible to express as a summation of 4 positive primes then print "-1".

Constraints:
1<=T<=100
1<=N<=106

Example:
Input:
2

5
8

Output:
-1
2 2 2 2

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Arun Tyagi
Author: arun03


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.