#include <bits/stdc++.h>
using namespace std;
long long n, ans1, ans2;
long long s(long long x) { return x * x * x; }
long long calc(long long x) {
  long long l = 0, r = 100000, ret = 0;
  while (l <= r) {
    long long mid = (l + r) >> 1;
    if (mid * mid * mid <= x)
      ret = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  return ret;
}
void dfs(long long r, long long x, long long sum) {
  if (r <= 7) {
    if (ans1 < x + r || (ans1 == x + r && ans2 < sum + r))
      ans1 = x + r, ans2 = sum + r;
    return;
  }
  long long t = calc(r);
  dfs(r - s(t), x + 1, sum + s(t));
  dfs(s(t) - 1 - s(t - 1), x + 1, sum + s(t - 1));
}
int main() {
  cin >> n;
  dfs(n, 0, 0);
  printf("%lld %lld\n", ans1, ans2);
  return 0;
}
