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