#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
long long x3[MAXN];
pair<long long, long long> ans(0, 0);
void dfs(long long m, long long cnt, long long t) {
  if (!m) {
    ans = max(ans, make_pair(cnt, t));
    return;
  }
  int q = upper_bound(x3 + 1, x3 + 100002, m) - x3;
  q--;
  dfs(m - x3[q], cnt + 1, t + x3[q]);
  if (q > 1) dfs(x3[q] - 1 - x3[q - 1], cnt + 1, t + x3[q - 1]);
}
int main() {
  long long m;
  for (long long i = 1; i <= 100001; i++) x3[i] = i * i * i;
  scanf("%I64d", &m);
  dfs(m, 0, 0);
  printf("%I64d %I64d\n", ans.first, ans.second);
}
