#include <bits/stdc++.h>
int main() {
  int cms;
  int ft, in;
  scanf("%d", &cms);
  ft = cms / 36;
  cms = cms % 36;
  in = cms / 3;
  cms = cms % 3;
  if (cms == 2) in++;
  if (in == 12) {
    ft++;
    in = 0;
  }
  printf("%d %d\n", ft, in);
}
