#include <bits/stdc++.h>
using namespace std;
int main() {
  int cm;
  cin >> cm;
  int inc = cm / 3;
  int remcm = cm % 3;
  int feet = inc / 12;
  int remin = inc % 12;
  if (remcm == 2) remin++;
  if (remin == 12) {
    feet++;
    remin = 0;
  }
  cout << feet << " " << remin;
  return 0;
}
