#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
const int mod = 1e9 + 7;
long long c[maxn + 5];
long long ans1 = 0, ans2 = 0;
void dfs(long long n, long long a, long long b) {
  if (n == 0) {
    if (a > ans1)
      ans1 = a, ans2 = b;
    else if (a == ans1 && b > ans2)
      ans2 = b;
    return;
  }
  long long te = (upper_bound(c + 1, c + 2 + maxn, n) - c) - 1;
  dfs(n - c[te], a + 1, b + c[te]);
  if (te > 1) dfs(c[te] - 1 - c[te - 1], a + 1, b + c[te - 1]);
}
int main() {
  for (long long i = 1; i <= maxn + 1; ++i) c[i] = i * i * i;
  long long n, a, b;
  cin >> n;
  dfs(n, 0, 0);
  cout << ans1 << ' ' << ans2 << endl;
  return 0;
}
