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