#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 50;
long long a[maxn];
pair<long long, long long> ans;
void dfs(long long now, long long cnt, long long cur) {
  if (!now) {
    ans = max(ans, make_pair(cnt, cur));
    return;
  }
  int q = upper_bound(a + 1, a + 1 + 100000, now) - a;
  q--;
  dfs(now - a[q], cnt + 1, cur + a[q]);
  if (q > 1) dfs(a[q] - 1 - a[q - 1], cnt + 1, cur + a[q - 1]);
}
void init() {
  for (int i = 1; i <= maxn - 50; i++) a[i] = 1LL * i * i * i;
  return;
}
int main(void) {
  init();
  long long p;
  cin >> p;
  dfs(p, 0, 0);
  cout << ans.first << " " << ans.second << endl;
}
