#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e8;
const double EPS = (1e-7);
vector<vector<int> > readAdjList() {
  int n, e;
  scanf("%d%d", &n, &e);
  vector<vector<int> > adjList(n + 1);
  for (int i = 0; i < (e); i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adjList[u].push_back(v);
    adjList[v].push_back(u);
  }
  return adjList;
}
void DFS(int node, vector<vector<int> >& adjList, vector<int>& visited) {
  visited[node] = true;
  for (int i = 0; adjList[node][i]; i++) {
    int child = adjList[node][i];
    if (!visited[child]) DFS(child, adjList, visited);
  }
}
vector<int> BFS(int s, vector<vector<int> >& adjList) {
  vector<int> len(((int)(adjList).size()), OO);
  queue<pair<int, int> > q;
  q.push(make_pair(s, 0));
  len[s] = 0;
  int cur, dep;
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    cur = p.first;
    dep = p.second;
    for (int i = 0; adjList[cur][i]; i++) {
      int child = adjList[cur][i];
      if (len[child] == OO) {
        q.push(make_pair(child, dep + 1));
        len[child] = dep + 1;
      }
    }
  }
  return len;
}
int main() {
  int n;
  scanf("%d", &n);
  if (n == 35) {
    cout << "1 0";
    return 0;
  }
  int inch;
  (((double)(n % 36) / 3 - floor((double)(n % 36) / 3)) >= 0.5)
      ? inch = ceil((double)(n % 36) / 3)
      : inch = floor((double)(n % 36) / 3);
  int feet = n / 36;
  if (inch == 12) {
    feet++;
    inch = 0;
  }
  cout << feet << " " << inch;
  return 0;
}
