#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int n, a, b;
int main() {
  scanf("%d", &n);
  a = n / 36;
  n = n % 36;
  b = n / 3;
  n = n % 3;
  b += (n == 2 ? 1 : 0);
  a += b / 12;
  b %= 12;
  printf("%d %d\n", a, b);
  return 0;
}
