#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  int feet = x / 36;
  x %= 36;
  int inch = x / 3;
  x %= 3;
  if (x == 2) inch++;
  cout << feet << " " << inch << "\n";
  return 0;
}
