cho.sh
Notes
Loading...

Four Primes

Time limit

2s

Memory limit

128 MB

Problem

Given a natural number N, write a program that decomposes N into the sum of exactly four prime numbers.

Input

The first line contains a natural number N. (1 <= N <= 1,000,000)

Output

If N can be represented as the sum of four prime numbers, print those four primes on one line separated by spaces. If it is impossible, print -1.