#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n;
  while (scanf("%d", &n) != EOF) {
    int p = n / 36, q = n % 36;
    printf("%d %d\n", p, q / 3 + (q % 3 >= 2));
  }
  return 0;
}
