#include <bits/stdc++.h>
using namespace std;
void file_open() {
  freopen("test.txt", "rt", stdin);
  freopen("test.out", "wt", stdout);
}
int main() {
  int n;
  int res;
  scanf("%d", &n);
  res = n / 3 + (n % 3 == 2);
  printf("%d %d", res / 12, res % 12);
  return 0;
}
