#include <bits/stdc++.h>
using namespace std;
const int INF = 1012345678;
const double PI = acos(-1.0);
const double EPS = 0.0000000304;
int main() {
  int N;
  scanf("%d", &N);
  if (N % 3 == 1) {
    N--;
  } else if (N % 3 == 2) {
    N++;
  }
  N /= 3;
  printf("%d %d\n", N / 12, N % 12);
}
