#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
void dbg() { cout << endl; }
template <typename T, typename... A>
void dbg(T a, A... x) {
  cout << a << ' ';
  dbg(x...);
}
long long s, t, n;
long long cal(long long k) { return k * k * k; }
void solve(long long x, long long y, long long z) {
  if (x == 0) {
    if (y > s || (y == s && z > t)) s = y, t = z;
    return;
  }
  long long i = 1ll;
  while (cal(i + 1) <= x) i++;
  solve(x - cal(i), y + 1, z + cal(i));
  solve(cal(i) - cal(i - 1) - 1, y + 1, z + cal(i - 1));
  return;
}
int main() {
  scanf("%lld", &n);
  solve(n, 0, 0);
  printf("%lld %lld\n", s, t);
  return 0;
}
