#include <bits/stdc++.h>
using namespace std;
long long m, e[1001001];
int f[1001001];
inline int SQRT3(long long m) {
  int k = lower_bound(e + 1, e + 100000 + 1, m + 1) - e - 1;
  return k;
}
int calc(long long m) {
  if (!m) return 0;
  int mx = SQRT3(m);
  int rlt = calc(m - e[mx]) + 1;
  if (f[mx] > rlt) {
    rlt = f[mx];
  }
  return rlt;
}
long long chk(long long m) {
  if (!m) return 0;
  int mx = SQRT3(m);
  int len = calc(m - e[mx]) + 1;
  long long rlt = chk(m - e[mx]) + e[mx];
  if (f[mx] > len) {
    rlt = chk(e[mx] - 1);
  }
  return rlt;
}
void prepare() {
  for (int i = 1; i <= 100000; i++) e[i] = 1ll * i * i * i;
  f[1] = 0;
  for (int i = 2; i <= 100000; i++) f[i] = calc(e[i] - 1);
}
int main() {
  prepare();
  cin >> m;
  int ans = calc(m);
  long long x = chk(m);
  cout << ans << ' ' << x << endl;
  return 0;
}
