#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long cub(long long x) { return x * x * x; }
void rek(long long x, long long steps, long long rem) {
  if (!x) {
    ans = max(ans, make_pair(steps, rem));
    return;
  }
  long long y = 1;
  while (cub(y + 1) <= x) y++;
  rek(x - cub(y), steps + 1, rem + cub(y));
  if (y - 1 >= 0) rek(cub(y) - cub(y - 1) - 1, steps + 1, rem + cub(y - 1));
}
int main() {
  long long x;
  scanf("%I64d", &x);
  rek(x, 0, 0);
  printf("%I64d %I64d\n", ans.first, ans.second);
  return 0;
}
