#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>

using namespace std;

int main() {
  using namespace boost::multiprecision;

  function<cpp_int(int, int)> rec = [&](int l, int r) {
    if (l == r) {
      return cpp_int(l);
    }
    int m = (l + r) >> 1;
    return cpp_int(rec(l, m) * rec(m + 1, r));
  };
  int n = 3e4;
  auto res = rec(1, n);

  string s;
  stringstream ss;
  ss << res;
  ss >> s;

  int z1 = 0;
  while (s[(int)s.length() - 1 - z1] == '0') z1++;
  int z2 = 0;
  for (int x = n; x; x /= 5) z2 += x / 5;
  assert(z1 == z2);

  cout << s << endl;
  cout << z1 << " " << z2 << endl;
  cerr << clock() / (double)CLOCKS_PER_SEC << endl;
}