#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  scanf("%d", &n);
  a = b = 0;
  while (n >= 36) n -= 36, a++;
  while (n >= 3) n -= 3, b++;
  if (n == 2) b++;
  while (b >= 12) b -= 12, a++;
  cout << a << " " << b << endl;
  return 0;
}
