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