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