/*#include <stdio.h>
void myswap(int* pa, int* pb)
{
int temp;
if(*pa>*pb)
{
temp=*pa;
*pa=*pb;
*pb=temp;
}
}
main()
{
int a, b;
scanf("%d%d", &a, &b);
myswap(&a, &b);
printf("%d %d", a, b);
}*/
/*
#include <stdio.h>
int main()
{
char str[100]={'a','b','c'};
*(str+i) == str[i]
printf("%d\n",str);
printf("%c\n",*(str+1));
}
#include<stdio.h>
char* mysubtr(char* str, int start, int count)
{
str[start+count]=0;
return str+start;
}
int main()
{
char str[110]={};
int a,b;
scanf("%s %d %d",str,&a,&b);
printf("%s",mysubtr(str,a,b));
}
*//*
#include<stdio.h>
int main()
{
int T,A=0,B=0,C=0;
scanf("%d",&T);
while(T>=300)
{
T-=300;
A++;
}
while(T>=60)
{
T-=60;
B++;
}
while(T>=10)
{
T-=10;
C++;
}
if(T==0) printf("%d %d %d",A,B,C);
else printf("-1");
return 0;
}*/