#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> bst;
const int maxn = 100010;
long long v[maxn];
void gen() {
  for (long long i = 0; i < maxn; i++) v[i] = i * i * i;
}
int find_a(long long key) {
  int x = 1, y = maxn, ans = 0;
  while (x < y) {
    int mid = x + (y - x) / 2;
    if (v[mid] <= key) {
      ans = mid;
      x = mid + 1;
    } else
      y = mid;
  }
  return ans;
}
void solve(long long _m, long long step, long long Sum) {
  if (_m == 0) {
    bst = max(bst, make_pair(step, Sum));
  } else {
    int cur = find_a(_m);
    solve(_m - v[cur], step + 1, Sum + v[cur]);
    if (cur - 1 >= 1)
      solve(v[cur] - 1 - v[cur - 1], step + 1, Sum + v[cur - 1]);
  }
}
int main() {
  long long m;
  gen();
  while (~scanf("%lld", &m)) {
    bst = make_pair(0, 0);
    solve(m, 0, 0);
    printf("%lld %lld\n", bst.first, bst.second);
  }
  return 0;
}
