#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n;
  cin >> n;
  long long dime, funt;
  dime = n / 3;
  funt = dime / 12;
  dime %= 12;
  cout << funt << " " << dime << "\n";
  return 0;
}
