#include <bits/stdc++.h>
using namespace std;
int to_d(long x) {
  int otv = x / 3;
  x %= 3;
  if (x >= 1.5) otv++;
  return otv;
}
int to_f(long x) {
  int otv = x / 12;
  x %= 12;
  if (x >= 6) otv++;
  return otv;
}
int main() {
  long sm;
  cin >> sm;
  cout << to_f(to_d(sm)) << " " << to_d(sm) % 12;
  return 0;
}
