#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;
    c = b / 3;
    if (b % 3 > 1) c++;
    printf("%d %d\n", a, c);
  }
  return 0;
}
