#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = 1000000000;
const int LIMIT = 100;
const int BUFFER_SIZE = 1024 * 2;
char buffer[BUFFER_SIZE];
char* read_line() {
  int ch, size = 0;
  while ((ch = getchar()) != '\n') buffer[size++] = ch;
  buffer[size] = '\0';
  return buffer;
}
int main(int argc, char* argv[]) {
  int feets, inches, n;
  cin >> n;
  inches = n / 3;
  int cm = n % 3;
  feets = inches / 12;
  cm = inches % 12 * 3 + cm;
  inches = int(double(cm) / 3.0 + 0.5);
  cout << feets << " " << inches << endl;
  return EXIT_SUCCESS;
}
