#include <bits/stdc++.h>
using namespace std;
char ch[20];
int a[10][10];
int main() {
  int n;
  cin >> n;
  int a, b;
  a = n / 36;
  int last = n - a * 36;
  b = last / 3;
  last = last - b * 3;
  if (last == 2) b++;
  cout << a << " " << b << endl;
  return 0;
}
