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