#include <bits/stdc++.h>
int main() {
  int c, i, f;
  while (scanf("%d", &c) != EOF) {
    printf("%d %d\n", c / 36,
           (c - c / 36 * 36) % 3 == 2 ? (c - c / 36 * 36) / 3 + 1
                                      : (c - c / 36 * 36) / 3);
  }
}
