#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, inch, feet;
  cin >> n;
  if (n % 3 <= 1)
    inch = n / 3;
  else
    inch = n / 3 + 1;
  feet = inch / 12;
  inch = inch - feet * 12;
  cout << feet << " " << inch;
}
