#include <iostream>
using namespace std;
int main()
{
int a,sum1,sum2,sum3;
while(cin>>a)
{
if(a<2500)
{
sum1=1;
if(a%25==0)
{
sum2=a/25;
sum3=25;
}
else
{
sum2=(a/25)+1;
sum3=(a%25);
}
}
else if(2500<a&&a<=7500)
{
sum1=2;
a=a-2500;
if(a%50==0)
{
sum2=a/50;
sum3=50;
}
else
{
sum2=(a/50)+1;
sum3=(a%50);
}
}
else if(7500<a&&a<=10000)
{
a=a-7500;
sum1=3;
if(a%25==0)
{
sum2=a/25;
sum3=25;
}
else
{
sum2=(a/25)+1;
sum3=(a%25);
}
}
cout<<sum1<<" "<<sum2<<" "<<sum3;
}
}