#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long double x, inches, feet;
  cin >> x;
  if ((long int)x % 3 >= 2)
    inches = ceil(x / 3);
  else
    inches = floor(x / 3);
  cout << (long int)inches / 12 << " " << (long int)inches % 12;
  return 0;
}
