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