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