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