#include <bits/stdc++.h>
using namespace std;
int INF = 0x3f3f3f3f;
long long num = 0, sum = 0;
void work(long long m, long long nows, long long nm, long long pre) {
  if (m < 0) return;
  if (m == 0) {
    if (nm > num || (nm == num && nows > sum)) num = nm, sum = nows;
    return;
  }
  long long q = pow(m, 1.0 / 3);
  long long mm = q * q * q, nw;
  if (pre == 0 && q > 0) {
    nw = m - mm;
    nw = min(nw, (q + 1) * (q + 1) * (q + 1) - mm);
    work(nw, nows + mm, nm + 1, q + 1);
    q--;
    mm = q * q * q, nw;
    if (q > 0) {
      nw = m - mm;
      nw = min(nw, (q + 1) * (q + 1) * (q + 1) - mm);
      work(nw, nows + mm, nm + 1, q + 1);
    }
  } else if (q > 0) {
    nw = m - mm;
    nw = min(nw, (q + 1) * (q + 1) * (q + 1) - mm - 1);
    nw = min(nw, pre * pre * pre - nows - mm - 1);
    work(nw, nows + mm, nm + 1, pre);
    q--;
    mm = q * q * q, nw;
    if (q > 0) {
      nw = m - mm;
      nw = min(nw, (q + 1) * (q + 1) * (q + 1) - mm - 1);
      nw = min(nw, pre * pre * pre - nows - mm - 1);
      work(nw, nows + mm, nm + 1, pre);
    }
  }
}
int main() {
  long long m;
  cin >> m;
  work(m, 0, 0, 0);
  printf("%lld %lld\n", num, sum);
}
