#include <bits/stdc++.h>
using namespace std;
double n, rem, foot, inch;
int main() {
  cin >> n;
  foot = n / 36;
  rem = fmod(n, 36);
  inch = round(rem / 3);
  cout << (int)foot << " " << (int)inch;
  return 0;
}
