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