#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 15;
int n;
int main() {
  cin >> n;
  int m = n / 36;
  cout << m;
  n -= m * 36;
  if (n % 3 == 1) n += 2;
  if (n % 3 == 2) n += 1;
  cout << " " << n / 3;
}
