#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  {
    int foot = n / 36, inch = 0;
    if (n % 36 != 0 && n % 36 != 35) {
      n -= 36 * (n / 36);
      inch = n / 3;
      if (n % 3 == 2) {
        inch++;
      }
    } else {
      if (n % 36 == 35) {
        foot++;
      }
    }
    cout << foot << " " << inch << endl;
  }
}
