#includeusing namespace std;
int main(){int n, a = 1;while (cin >> n){if (n <= 2500){cout << a << " " << (n + 24) / 25 << " " << (n + 24) % 25 + 1 << endl;}else if (n > 2500 && n <= 7500){n -= 2500;cout << a + 1 << " " << (n + 49) / 50 << " " << (n + 49) % 50 + 1 << endl;}else if (n > 7500 && n <= 10000){n -= 7500;cout << a + 2 << " " << (n + 24) / 25 << " " << (n + 24) % 25 + 1 << endl;}}}