#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const double eps = 1e-10;
int main() {
  int n;
  scanf("%d", &n);
  int feet, inches;
  inches = n / 3;
  if (n - inches * 3 > 1) inches++;
  feet = inches / 12;
  inches %= 12;
  cout << feet << " " << inches << endl;
  return 0;
}
