#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int a = n / 36;
  int b = n % 36 / 3;
  if (n % 36 % 3 == 2) ++b;
  if (b == 36) {
    ++a;
    b = 0;
  }
  cout << a << ' ' << b << endl;
  return 0;
}
