#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
void solve(long long res, long long cnt, long long vol) {
  if (res == 0)
    ans = max(ans, {cnt, vol});
  else {
    long long t = pow(res, 0.33);
    while ((t + 1) * (t + 1) * (t + 1) <= res) ++t;
    solve(res - t * t * t, cnt + 1, vol + t * t * t);
    solve(t * t * t - (t - 1) * (t - 1) * (t - 1) - 1, cnt + 1,
          vol + (t - 1) * (t - 1) * (t - 1));
  }
}
signed main() {
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  solve(n, 0, 0);
  cout << ans.first << " " << ans.second << endl;
}
