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