#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
if(n==0)
{
cout<<"0 0 0";
}
if(n<=2||n==5)
{
cout<<-1;
return 0;
}
int a=n/14;
n%=14;
int b=a,c=a;
if(n%3==1){
b++;
c+=n/3-1;
}
else if(n%3==2){
b+=2;
c+=n/3-2;
}
else
c+=n/3;
cout<<a<<" "<<b<<" "<<c;
return 0;
}