#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, x;
vector<int> a;
vector<int> b;
int main() {
  scanf("%d", &n);
  m = n / 36;
  double d = (n % 36) / 3.0;
  int cel = int(d);
  if (d - cel >= 0.5) {
    cel++;
  }
  if (cel == 12) {
    m++;
    cel = 0;
  }
  printf("%d %d\n", m, cel);
  return 0;
}
