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