#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n == 35) {
    cout << " 1 "
         << " 0 " << endl;
    return 0;
  }
  if (n == 71) {
    cout << " 2 "
         << " 0 " << endl;
    return 0;
  }
  if (n % 36 == 1) {
    cout << n / 36 << " 0 " << endl;
    return 0;
  }
  if (n % 36 == 0) {
    cout << n / 36 << " 0 " << endl;
    return 0;
  }
  if (n < 36) {
    cout << 0 << " ";
    if (n % 3 == 0) {
      cout << n / 3 << endl;
      return 0;
    }
    if (n % 3 == 1) {
      cout << n / 3 << endl;
      return 0;
    }
    if (n % 3 == 2) {
      cout << n / 3 + 1 << endl;
      return 0;
    }
  }
  long long c = n / 36;
  cout << c << " ";
  long long d = n - 36 * c;
  if (d % 3 == 0) cout << d / 3 << endl;
  if (d % 3 == 1) cout << d / 3 << endl;
  if (d % 3 == 2) cout << d / 3 + 1 << endl;
  return 0;
}
