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