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