#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;
  cin >> n;
  cout << (n / 36) << " " << round((n - (n / 36) * 36) / 3.0) << "\n";
}
