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