#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, f = 0, i = 0, r = 0, t = 0;
  cin >> n;
  f = (n / 36);
  r = n % 36;
  i = r / 3;
  t = r % 3;
  if (t == 2) i += 1;
  if (i == 12) {
    i = 0;
    f += 1;
  }
  cout << f << " " << i;
}
