#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, ft = 0, inches;
  double in = 0;
  cin >> n;
  ft = n / 36;
  n = n - 36 * (n / 36);
  in = n / 3.0;
  if ((ceil(in) - in) < (in - floor(in))) in = ceil(in);
  inches = in;
  cout << ft << " " << inches << endl;
}
