#include <bits/stdc++.h>
using namespace std;
long long n;
pair<long long, long long> ans;
vector<long long> p;
void dfs(long long w, long long tot, long long sum) {
  if (w == 0) {
    ans = max(ans, pair<long long, long long>(tot, sum));
    return;
  }
  int pos = upper_bound(p.begin(), p.end(), w) - p.begin() - 1;
  dfs(w - p[pos], tot + 1, sum + p[pos]);
  if (pos > 0) dfs(p[pos] - 1 - p[pos - 1], tot + 1, sum + p[pos - 1]);
}
int main() {
  ans = pair<long long, long long>(0, 0);
  scanf("%lld", &n);
  for (long long i = 1; i * i * i <= n; i++) p.push_back(i * i * i);
  p.push_back(1e17);
  dfs(n, 0, 0);
  printf("%lld %lld\n", ans.first, ans.second);
  return 0;
}
