#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, foot, inch;
  scanf("%d", &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;
}
