#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  int ans1 = n / 36;
  int anst = n % 36;
  int ans2 = anst / 3;
  if (anst % 3 == 2) ans2 += 1;
  ans1 += ans2 / 12;
  ans2 %= 12;
  printf("%d %d\n", ans1, ans2);
  return 0;
}
