#include <bits/stdc++.h>
using namespace std;
void includenow();
int main() {
  includenow();
  long long int t;
  cin >> t;
  long long ans = 0;
  ans = t / 12;
  long long p = (int(t % 12)) / 3;
  long long x = (int(t % 12)) % 3;
  if (x == 2) p++;
  cout << ans << " " << p;
}
void includenow() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
