#include <bits/stdc++.h>
using namespace std;
double n, m;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> n;
  int a = round(n / 36);
  m = n - (a * 36);
  cout << a << " " << round(m / 3) << endl;
  return 0;
}
