#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
int main() {
  int n;
  cin >> n;
  int d = n / 3;
  if (n % 3 == 2) d++;
  cout << d / 12 << " " << d % 12;
  return 0;
}
