#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a = -1, b = 0;
  scanf("%d", &n);
  for (int i = 0; i <= n; i++) {
    int x, y;
    if (n - 36 * i < 0) break;
    if ((n - 36 * i) % 3 <= 1) {
      x = i;
      y = (n - 36 * i) / 3;
      while (y >= 12) {
        x++;
        y -= 12;
      }
    } else {
      x = i;
      y = (n - 36 * i) / 3 + 1;
      while (y >= 12) {
        x++;
        y -= 12;
      }
    }
    if (x > a) {
      a = x;
      b = y;
    }
  }
  printf("%d %d\n", a, b);
}
