#include <bits/stdc++.h>
static constexpr long long cube(long long N) { return N * N * N; }
int main() {
  long long max;
  std::cin >> max;
  int curr = 1;
  std::vector<int> sides;
  unsigned long long sum = 0;
  while (true) {
    unsigned long long next = cube(curr);
    while (sum + next >= cube(curr + 1)) next = cube(++curr);
    if (next > max) break;
    if (sum + next > max) break;
    sides.push_back(curr);
    sum += next;
  }
  for (int i = sides.size() - 1; i >= 0; i--) {
    while (true) {
      unsigned long long new_sum = sum - cube(sides[i]) + cube(sides[i] + 1);
      sides[i]++;
      unsigned long long pref = 0;
      bool can_increase = new_sum <= max;
      for (int j = 0; j < sides.size(); j++) {
        pref += cube(sides[j]);
        if (pref >= cube(sides[j] + 1)) {
          can_increase = false;
          break;
        }
      }
      sides[i]--;
      if (!can_increase) break;
      sides[i]++;
      sum = new_sum;
    }
  }
  std::cout << sides.size() << ' ' << sum << std::endl;
  return EXIT_SUCCESS;
}
