#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  if (n / 36 + 1 == (n + 1) / 36) n++;
  cout << n / 36 << " " << round((n - (n / 36) * 36) * 1.0 / 3);
  return 0;
}
