#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1200;
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    if (n % 3 <= 1)
      n = n / 3;
    else
      n = (n + 2) / 3;
    printf("%d %d\n", n / 12, n % 12);
  }
  return 0;
}
