#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  scanf("%d\n", &n);
  int q;
  if (n % 36 >= 6)
    q = n / 36 + 1;
  else
    q = n / 36;
  n %= 36;
  if (n % 3 == 2)
    cout << q << " " << n / 3 + 1;
  else
    cout << q << " " << n / 3;
  fclose(stdin);
  fclose(stdout);
  return 0;
}
