#include <bits/stdc++.h>
using namespace std;
int main() {
  int l;
  cin >> l;
  int a = (int)floor(l / 36.0);
  int b = (l - a * 36) / 3;
  if (l - (a * 36) - (b * 3) == 2) {
    b++;
  }
  if (b == 12) {
    b = 0;
    a++;
  }
  cout << a << " " << b << endl;
  return 0;
}
