#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, feet, inch, x;
  cin >> n;
  if (n == 35 || n == 34) {
    feet = 1;
    inch = 0;
  } else {
    feet = n / 36;
    x = n - feet * 36;
    inch = x / 3;
    if (x % 3 > 1) inch++;
  }
  cout << feet << " " << inch << endl;
  return 0;
}
