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