#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a, b;
  b = (int)ceil((double)n / 3.);
  a = (int)floor((double)b / 12.);
  b -= a * 12;
  cout << a << " " << b << "\n";
}
