#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  int b = a % 3 >= 2 ? (a / 3 + 1) : (a / 3);
  int foot = b / 12;
  b -= foot * 12;
  printf("%d %d", foot, b);
  return 0;
}
