#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, in;
  double inches = 0, feets = 0;
  cin >> n;
  feets = n / 36.0;
  if ((ceil(feets) - feets) < (feets - floor(feets))) feets = ceil(feets);
  ft = feets;
  n = n - 36 * (ft);
  if (n > 0) {
    inches = n / 3.0;
    if ((ceil(inches) - inches) < (inches - floor(inches)))
      inches = ceil(inches);
    in = inches;
  } else
    in = 0;
  cout << ft << " " << inches << endl;
}
