#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int inchs = n / 3;
  if (n % 3 == 2) inchs++;
  int feet = inchs / 12;
  inchs = inchs % 12;
  cout << feet << " " << inchs << endl;
}
