#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, feet, inch;
  double a, b, up, down;
  scanf("%d", &n);
  b = double(n) / double(36.0);
  up = ceil(b);
  down = floor(b);
  if (abs(up - b) < abs(down - b))
    feet = int(up);
  else
    feet = int(down);
  n -= 36 * feet;
  n = min(n, 0);
  a = double(n) / double(3.0);
  up = ceil(a);
  down = floor(a);
  if (abs(up - a) < abs(down - a))
    inch = int(up);
  else
    inch = int(down);
  printf("%d %d\n", feet, inch);
  return 0;
}
