#include <bits/stdc++.h>
using namespace std;
int main() {
  int feet = 0;
  int inch_check;
  int inch;
  int n;
  cin >> n;
  if (n < 1 || n > 10000) {
    cout << "Out of range" << endl;
    return 0;
  }
  feet = n / 36;
  inch_check = n % 36;
  inch = inch_check / 3;
  if (inch_check % 3 == 2) inch = inch + 1;
  if (inch == 12) {
    feet = feet + 1;
    inch = 0;
  }
  cout << feet << " " << inch;
  return 0;
}
