#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 7;
long long n, m, w, h, ans, A, B;
int main() {
  cin >> n;
  cout << n / 36 << ' ' << (n % 36) / 3 + ((n % 36) % 3 > 1) << endl;
  return 0;
}
