Three Consecutive Numbers

Author: QuwsarOhi

Problem Setter: Elias Hassan Naim

Intake 32, Department of CSE

Given a number N. You have to find out three integers X, Y, and Z where,

 

1.      X = Y – 1,

2.      Z = Y + 1,  and

3.      X + Y + Z = N.

Input Format

Every input contains a positive number N (6<=N<=1000).

Output Format

If no valid solution exists, print -1. Otherwise, print X, Y, and Z in a line and print a space between every two consecutive integers. Check sample input/output for clarity.

Samples

Input
6
Output
1 2 3
Input
8
Output
-1
Limits
Language Time Memory
GNU C 11 1s 512MB
GNU C++ 14 1s 512MB
GNU C++ 11 1s 512MB
PHP 7 1s 1024MB
Java (OpenJDK 8) 1s 4096MB
Statistics
Login To Submit