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