#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int f = n / 36, i = ((n - f * 36) / 3.00);
  if ((n - f * 36) % 3 == 1) i++;
  cout << f << " " << i << endl;
  return 0;
}
