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