#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a = n / 36;
  n %= 36;
  int b = n / 3;
  n %= 3;
  if (n == 2) b++;
  if (b >= 12) a += (b / 12);
  b %= 12;
  cout << a << " " << b;
  return 0;
}
