#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int inches;
  inches = n / 3 + (n % 3 > 1);
  int feet;
  feet = inches / 12;
  inches %= 12;
  cout << feet << " " << inches << endl;
  return 0;
}
