#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
void DP(long long m, long long sub, long long vol) {
  if (!m) {
    ans = max(ans, {sub, vol});
    return;
  }
  long long x = 1;
  while ((x + 1) * (x + 1) * (x + 1) <= m) x++;
  DP(m - (x * x * x), sub + 1, vol + (x * x * x));
  if (x - 1 >= 0)
    DP((x * x * x) - 1 - ((x - 1) * (x - 1) * (x - 1)), sub + 1,
       vol + ((x - 1) * (x - 1) * (x - 1)));
  return;
}
int main() {
  long long m;
  cin >> m;
  DP(m, 0, 0);
  cout << ans.first << " " << ans.second;
  return 0;
}
