#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long a[100005];
long long m;
void dfs(long long rm, long long h, long long r) {
  if (rm == 0) {
    ans = max(ans, make_pair(h, r));
    return;
  }
  long long t = upper_bound(a + 1, a + 100002, rm) - a;
  t--;
  dfs(rm - a[t], h + 1, r + a[t]);
  if (t > 1) {
    dfs(a[t] - 1 - a[t - 1], h + 1, r + a[t - 1]);
  }
}
int main() {
  cin >> m;
  for (long long i = 1; i <= 100001; i++) {
    a[i] = i * i * i;
  }
  dfs(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
