#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, a, b, m;
  cin >> n;
  m = n % 36;
  a = n / 36;
  b = (m + 1) / 3;
  if (b >= 12) b -= 12, a++;
  cout << a << ' ' << b;
}
