#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const ll mod = 1000000007;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ll n, a, b;
  cin >> n;
  a = round((n - (n / 36) * 36) / 3.0);
  b = n / 36;
  if (a == 12) {
    a = 0;
    b += 1;
  }
  cout << b << " " << a << "\n";
}
