#include <bits/stdc++.h>
int n;
int main() {
  return (scanf("%d", &n), printf("%d %d", int(floor(n / 3.0 + 0.5)) / 12,
                                  int(floor(n / 3.0 + 0.5)) % 12)) %
         1;
}
