#include <bits/stdc++.h>
using namespace std;
long long nb = 0;
long long ov(long long m) {
  if (m == 0) {
    nb = 0;
    return 0;
  }
  long long ma = cbrt(m);
  long long sm = ov(m - (ma * ma * ma));
  long long sb = nb;
  m = (ma * ma * ma) - 1;
  ma--;
  long long vm = ov(m - (ma * ma * ma));
  long long vb = nb;
  if (vb > sb) {
    nb = vb + 1;
    return vm + (ma * ma * ma);
  }
  nb = sb + 1;
  ma++;
  return sm + (ma * ma * ma);
}
int main() {
  long long m;
  cin >> m;
  m = ov(m);
  cout << nb << " " << m << endl;
  cin >> m;
}
