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