#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int foot = 0;
  int inch = 0;
  if (n < 36) {
    if (n == 2) {
      inch++;
    } else
      for (int e = 1; e < n; e = e + 3) {
        inch++;
      }
  } else if (n == 36) {
    foot++;
  } else if (n > 36) {
    for (int z = 36; z < n; z = z + 36) {
      foot++;
    }
    if (n == 37) {
      inch = 0;
    } else if (n > 37) {
      if (n == 38) {
        inch++;
      } else
        for (int i = 37; i < n; i = i + 3) inch++;
    }
  }
  cout << foot << " " << inch;
  return 0;
}
