#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> best;
void solve(long long n, long long blocks, long long sum) {
  if (n == 0) {
    best = max(best, {blocks, sum});
    return;
  }
  long long a = cbrt(n);
  long long val1 = a * a * a;
  long long val2 = (a - 1) * (a - 1) * (a - 1);
  solve(n - val1, blocks + 1, sum + val1);
  if (a > 1) solve(val1 - 1 - val2, blocks + 1, sum + val2);
}
int main() {
  long long n;
  cin >> n;
  solve(n, 0, 0);
  cout << best.first << " " << best.second << endl;
  return 0;
}
