#include <bits/stdc++.h>
using namespace std;
int cx[] = {-1, 0, 0, 1, -1, -1, 1, 1, 0},
    cy[] = {0, -1, 1, 0, -1, 1, 1, -1, 0};
int ingrid(int ii, int jj, int R, int C) {
  if (ii < 0 || jj < 0 || ii >= R || jj >= C) return 0;
  return 1;
}
int main() {
  int n;
  cin >> n;
  cout << n / 36 << " ";
  int a = (n % 36) / 3;
  if (((n % 36) % 3) == 2) a++;
  cout << a << endl;
  return 0;
}
