#include <bits/stdc++.h>
using namespace std;
int main() {
  int s, d, f, p;
  float f1, d1;
  cin >> s;
  f = s / 30.48;
  if (f != 0)
    d = (s - (f * 30.48)) / 4;
  else
    d = d = (s - (f * 30.48)) / 2;
  cout << f << " " << d;
  return 0;
}
