#include <bits/stdc++.h>
int n;
int feet, inchs;
int main() {
  scanf("%d", &n);
  feet = floor(double(n) / 36.0);
  inchs = floor(0.5 + (n - feet * 36.0) / 3.0);
  if (inchs == 12) {
    inchs = 0;
    feet++;
  }
  printf("%d %d\n", feet, inchs);
}
