#include <bits/stdc++.h>
using namespace std;
const long long N = 100000;
long long poww(long long x) { return x * x * x; }
long long work(long long x) {
  long long t = pow(x, 0.333333333333333333);
  while (poww(t + 1) <= x) t++;
  while (poww(t) > x) t--;
  return t;
}
map<long long, pair<long long, long long> > an;
long long num;
pair<long long, long long> solve(long long m) {
  if (an.count(m)) return an[m];
  pair<long long, long long> ans(-233, -233), t, lt(-1, -1);
  long long t3 = work(m + 1) - 1;
  if (t3 > 0 && t3 <= N) {
    t = solve(poww(t3 + 1) - poww(t3) - 1);
    t.first++;
    t.second += poww(t3);
    ans = t;
  }
  if (t3 != m) {
    for (long long i = t3 + 1; i <= N; i++) {
      if (m - poww(i) < 0) break;
      t = solve(m - poww(i));
      if (lt.first != -1 && lt.first != t.first) break;
      t.first++;
      t.second += poww(i);
      ans = max(ans, t);
    }
  }
  return an[m] = ans;
}
int main() {
  long long m;
  an[0] = make_pair(0, 0);
  scanf("%lld", &m);
  auto t = solve(m);
  printf("%lld %lld\n", t.first, t.second);
  return 0;
}
