#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y;
  cin >> n;
  x = n / 36;
  y = n % 36 / 3;
  if (n % 36 % 3 == 2) y++;
  x += y / 12;
  y %= 12;
  cout << x << " " << y;
  return 0;
}
