링크 : https://www.acmicpc.net/problem/10162
/*
문제 : 전자레인지
링크 : https://www.acmicpc.net/problem/10162
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n ;
cin >> n;
if(n % 10 != 0) cout << -1;
else{
cout << n / 300 << " " << (n % 300) / 60 << " " << (n % 60) / 10;
}
return 0;
}