#include <bits/stdc++.h>
int r(double n) {
  if (n - (int)n < 0.5)
    return (int)n;
  else
    return (int)(n) + 1;
}
int main() {
  int n, inch, feet;
  scanf("%d", &n);
  feet = n / 36;
  inch = r((n % 36) / 3.0);
  printf("%d %d\n", feet, inch);
  return 0;
}
