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