#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:32000000")
using namespace std;
int n;
void do_solve() {
  scanf("%d", &n);
  int inches = (n + 1) / 3;
  int feet = inches / 12;
  inches %= 12;
  cout << feet << " " << inches;
}
int main() {
  do_solve();
  return 0;
}
