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