#include <bits/stdc++.h>
using namespace std;
pair<int, long long> solve(long long n) {
  if (!n) return {0, 0};
  long long a = 1;
  while ((a + 1) * (a + 1) * (a + 1) <= n) a++;
  pair<int, long long> r1 = solve(n - a * a * a),
                       r2 =
                           solve((a * a * a) - 1 - (a - 1) * (a - 1) * (a - 1));
  if (r1.first > r2.first) return {1 + r1.first, r1.second + a * a * a};
  if (r1.first < r2.first)
    return {1 + r2.first, r2.second + (a - 1) * (a - 1) * (a - 1)};
  return {1 + r1.first,
          max(a * a * a + r1.second, (a - 1) * (a - 1) * (a - 1) + r2.second)};
}
int main() {
  long long n;
  scanf("%lld", &n);
  pair<int, long long> r = solve(n);
  printf("%d %lld\n", r.first, r.second);
  return 0;
}
