#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
const int INFTY = 1e7;
const long long MOD2 = 1e10;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long cm;
  cin >> cm;
  long long inches = cm / 3 + (cm % 3 == 2);
  cout << inches / 12 << " " << inches % 12 << endl;
}
