#include <bits/stdc++.h>
using namespace std;
long long x;
pair<int, long long> res;
void cube(long long m, int steps, long long used) {
  if (!m) {
    res = max(res, {steps, used});
    return;
  }
  long long i = 1;
  while ((i + 1) * (i + 1) * (i + 1) <= m) i++;
  cube(m - i * i * i, steps + 1, used + i * i * i);
  if (x)
    cube(i * i * i - 1 - (i - 1) * (i - 1) * (i - 1), steps + 1,
         used + (i - 1) * (i - 1) * (i - 1));
}
int main() {
  cin >> x;
  cube(x, 0, 0);
  cout << res.first << " " << res.second << endl;
  return 0;
}
