#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int res;
  if (n % 3 == 2)
    res = n / 3 + 1;
  else
    res = n / 3;
  cout << res / 12 << ' ' << res % 12;
  return 0;
}
