#include <bits/stdc++.h>
int main() {
  short int centimeters, feet, inches;
  std::cin >> centimeters;
  feet = centimeters / (12 * 3);
  centimeters -= feet * (12 * 3);
  inches = centimeters / 3;
  centimeters -= inches * 3;
  if (centimeters == 2) {
    ++inches;
  }
  std::cout << feet << " " << inches << std::endl;
  return EXIT_SUCCESS;
}
