#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> solve(long long m, int n = 0, long long first = 0) {
  if (m == 0) {
    return pair<long long, long long>(n, first);
  }
  long long a = 1;
  while (((a) * (a) * (a)) <= m) a++;
  a--;
  return max(solve(m - ((a) * (a) * (a)), n + 1, first + ((a) * (a) * (a))),
             solve(((a) * (a) * (a)) - 1 - ((a - 1) * (a - 1) * (a - 1)), n + 1,
                   first + ((a - 1) * (a - 1) * (a - 1))));
}
int main() {
  long long m;
  cin >> m;
  pair<long long, long long> ans = solve(m);
  printf("%I64d %I64d\n", ans.first, ans.second);
  return 0;
}
