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