#include <bits/stdc++.h>
using std ::vector;
long long n;
vector<long long> v;
long long cube(long long x) { return x * x * x; }
bool good() {
  long long s = 0;
  for (int x : v) {
    s += cube(x);
    if (s >= cube(x + 1)) {
      return 0;
    }
  }
  return s <= n;
}
int main() {
  scanf("%I64d", &n);
  long long s = 0;
  long long c = 1;
  while (s <= n && s + cube(c) <= n) {
    while (s + cube(c) < cube(c + 1) && s + cube(c) <= n) {
      v.push_back(c);
      s += cube(c);
    }
    c++;
  }
  for (int i = v.size() - 1; i >= 0; i--) {
    while (true) {
      long long add = cube(v[i] + 1) - cube(v[i]);
      v[i]++;
      if (!good()) {
        v[i]--;
        break;
      } else {
        s += add;
      }
    }
  }
  printf("%d %I64d\n", (int)v.size(), s);
  return 0;
}
