#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  scanf("%d", &n);
  int x = n / 36;
  n -= x * 36;
  int y = n / 3;
  n -= y * 3;
  if (n == 2) y++;
  cout << x << " " << y << endl;
}
