#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int n, a, b, c, d;
  while (scanf("%d", &n) != EOF) {
    a = n / 3;
    b = n % 3;
    if (b == 2) a++;
    printf("%d %d\n", a / 12, a % 12);
  }
  return 0;
}
