#include <bits/stdc++.h>
using namespace std;
long long ans1, ans2, n;
void work(long long n, long long x, long long s) {
  if (!n) {
    if (s > ans1) {
      ans1 = s;
      ans2 = x;
    } else if (s == ans1 && x > ans2) {
      ans2 = x;
    }
    return;
  }
  long long p = 1;
  for (; p * p * p <= n; p++)
    ;
  p--;
  work(n - p * p * p, x + p * p * p, s + 1);
  work(p * p * p - (p - 1) * (p - 1) * (p - 1) - 1,
       x + (p - 1) * (p - 1) * (p - 1), s + 1);
}
int main() {
  scanf("%lld", &n);
  work(n, 0, 0);
  printf("%lld %lld\n", ans1, ans2);
}
