#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> res;
vector<long long int> cube;
void solve(long long int rest, long long int cnt, long long int sum) {
  if (rest == 0) {
    res = max(res, make_pair(cnt, sum));
    return;
  }
  auto it = lower_bound(cube.begin(), cube.end(), rest + 1) - 1;
  solve(rest - *it, cnt + 1, sum + *it);
  if (it != cube.begin()) {
    solve((*it) - 1 - (*(it - 1)), cnt + 1, sum + (*(it - 1)));
  }
}
int main() {
  long long int N;
  cin >> N;
  cube.push_back(0ll);
  for (int n = (1); n < (1000000); ++n) cube.push_back((long long)n * n * n);
  solve(N, 0, 0);
  cout << res.first << ' ' << res.second << endl;
  return 0;
}
