#include <bits/stdc++.h>
using namespace std;
const long double PI = acosl(-1.);
pair<long long, long long> best = {0, 0};
inline long long my3(long long x) { return x * x * x; }
void doit(long long m, long long cnt, long long sum) {
  if (m == 0) {
    best = max(best, make_pair(cnt, sum));
  } else {
    int x = 1;
    while (my3(x) <= m) ++x;
    while (my3(x) > m) --x;
    doit(m - my3(x), cnt + 1, sum + my3(x));
    if (x > 1) {
      doit(my3(x) - 1 - my3(x - 1), cnt + 1, sum + my3(x - 1));
    }
  }
}
int main() {
  long long m;
  cin >> m;
  doit(m, 0, 0);
  cout << best.first << " " << best.second << endl;
}
