#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int foot, inches;
  scanf("%d", &n);
  foot = n / 3;
  foot = foot / 12;
  inches = n % 3;
  lround(foot);
  printf("%d %d", foot, inches);
}
