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