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