#include <bits/stdc++.h>
using namespace std;
const int N = 32100;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int a = n / 36;
    n %= 36;
    int b = n / 3;
    n %= 3;
    if (n >= 2) b++;
    printf("%d %d\n", a, b);
  }
  return 0;
}
