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