#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, foot = 0, inch = 0;
  cin >> n;
  while (n >= 36) {
    n -= 36;
    foot++;
  }
  while (n >= 3) {
    n -= 3;
    inch++;
  }
  if (n == 2) inch++;
  while (inch >= 12) {
    inch -= 12;
    foot++;
  }
  cout << foot << " " << inch << endl;
  return 0;
}
