#include <bits/stdc++.h>
using namespace std;
int main() {
  int x = 0;
  int a, y = 0;
  cin >> a;
  while (a >= 3) {
    a = a - 3;
    y++;
    if (y == 12) {
      x++;
      y = 0;
    }
  }
  if (a == 2) y++;
  if (y == 12) {
    x++;
    y = 0;
  }
  cout << x << " " << y;
}
