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