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