#inclue <iostream>
using namespace std;


int main()
{

int bodovi, set;

cin>> bodovi;
int provera;
provera = set*3;

if(provera> bodovi)
{

cout<< -1;
}
int x1=0, x2=0;
set3 = bodovi - (2*set);
if(set3%2==1)
{
x1 = 1; 
set3 = set3-1;
}
int p1, p2;

p1 = set3/2 + 1;
p2 = set3/2 - 1;

cout<< set<< " "<<x1;
cout<< set<< " "<<x2;
cout<< p1 << " " <<p2;

}