#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int cins = 0;
  int cf = 0;
  if (n >= (12 * 3)) {
    while (n >= (12 * 3)) {
      cf++;
      n -= (12 * 3);
    }
  }
  if (n >= 3 || n == 2) {
    while (n >= 3 || n == 2) {
      cins++;
      n -= 3;
    }
  }
  if (cins == 12) {
    cf++;
    cins = 0;
  }
  cout << cf << " " << cins << endl;
}
