#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  int t = n / 3, ninch, nfeet;
  if (n - t * 3 < 2)
    ninch = t;
  else
    ninch = t + 1;
  t = ninch / 12;
  nfeet = t;
  t = (n - nfeet * 36) / 3;
  if (n - nfeet * 36 - t * 3 < 2)
    ninch = t;
  else
    ninch = t + 1;
  cout << nfeet << " " << ninch;
  return 0;
}
