#include <bits/stdc++.h>
using namespace std;
const int INF = (int)2e+9;
const int MAX_N = 2e5 + 7;
int main() {
  int cm;
  cin >> cm;
  int inch = cm / 3;
  if (cm % 3 == 2) inch++;
  cout << inch / 12 << " " << inch % 12;
  return 0;
}
