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