#include <bits/stdc++.h>
using namespace std;
const int N = 210;
const int M = 200000;
const int K = 510;
const int LIT = 2500;
const int INF = 1 << 30;
int n;
void init() {}
void solve() {
  int a = 0, b = 0;
  b = n % 3;
  if (b == 2)
    b = 1;
  else
    b = 0;
  a = int(n / 3) + b;
  int ra, rb;
  ra = a / 12, rb = a % 12;
  cout << ra << " " << rb << endl;
}
int main() {
  while (cin >> n) {
    init();
    solve();
  }
}
