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