#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const long long MODPRIMA = (long long)1e9 + 7;
const long long MAXX = (long long)1e18;
const long long MINN = -(long long)1e18;
const double EPS = 1e-9;
int N, feet, inch;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  feet = (N / 36);
  N -= 36 * feet;
  inch = (N / 3);
  if (N % 3 == 2) inch++;
  if (inch >= 12) {
    feet++;
    inch -= 12;
  }
  cout << feet << " " << inch << '\n';
  return 0;
}
