#include <bits/stdc++.h>
using namespace std;
long long MAX, res, ans;
void dfs(long long lef, long long h, long long V) {
  if (!lef) {
    if (h > res) res = h, ans = V;
    return;
  }
  long long x = 0;
  while (((x + 1) * (x + 1) * (x + 1)) <= lef) ++x;
  dfs(lef - ((x) * (x) * (x)), h + 1, V + ((x) * (x) * (x)));
  if (x)
    dfs(((x) * (x) * (x)) - ((x - 1) * (x - 1) * (x - 1)) - 1, h + 1,
        V + ((x - 1) * (x - 1) * (x - 1)));
  return;
}
int main() {
  cin >> MAX, dfs(MAX, 0, 0);
  cout << res << " " << ans << endl;
  return 0;
}
