#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int feet = n / 36, inch;
  n = n % 36;
  inch = n / 3;
  n = n % 3;
  if (n == 2) inch++;
  if (inch >= 12) {
    feet = feet + inch / 12;
    inch = inch % 12;
  }
  printf("%d %d", feet, inch);
  return 0;
}
