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