#include <bits/stdc++.h>
using namespace std;
inline void read(register int *n) {
  register char c;
  *n = 0;
  do {
    c = getchar();
  } while (c < '0' || c > '9');
  do {
    *n = c - '0' + *n * 10;
    c = getchar();
  } while (c >= '0' && c <= '9');
}
int main(int argv, char **argc) {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int a = n / 36;
  int b = (n % 36) / 3;
  if (n % 3 == 2) b++;
  if (b >= 12) a++, b -= 12;
  cout << a << " " << b << endl;
  return 0;
}
