#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  float n;
  cin >> n;
  double a = n / 36 + 0.5;
  double b = n / 3 - a * 12 + 0.5;
  cout << (int)a << " " << (int)b;
  return EXIT_SUCCESS;
}
