#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp, result, feet = 0;
  float val;
  cin >> n;
  val = n / 3.0;
  temp = (int)val;
  if (val - temp >= 0.5)
    result = (int)ceil(val);
  else
    result = (int)floor(val);
  while (result >= 12) {
    feet++;
    result -= 12;
  }
  cout << feet << " " << result;
  return 0;
}
