#include <bits/stdc++.h>
using namespace std;
int main() {
  int cm, inch = 0, feet = 0;
  cin >> cm;
  if (cm > 36) {
    feet = (cm - (cm % 12)) / 36;
    if ((cm % 36) % 3 == 2) {
      inch = (((cm % 36) - 2) / 3) + 1;
    } else {
      inch = (cm % 36 - (cm % 36) % 3) / 3;
    }
  } else {
    if (cm % 3 == 2) {
      inch = ((cm - (cm % 3)) / 3) + 1;
    } else {
      inch = (cm - cm % 3) / 3;
    }
  }
  cout << feet << " " << inch << endl;
  return 0;
}
