#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
int main() {
  int n;
  scanf("%d", &n);
  double inch = (double)n / 3;
  int ninch = (int)inch;
  if (inch - (double)ninch >= 0.5) ++ninch;
  printf("%d %d\n", ninch / 12, ninch % 12);
  return 0;
}
