#include <iostream> using namespace std; int main() { unsigned long x, n, k; cin >> x; for (k = 1; k <= 100; k++) { n = (x - 52 * 7 * 3 * k) / (52 * 7); if (x == 52 * 7 * (3 * k + n)) break; } cout << n << endl << k; return 0; }