#include <bits/stdc++.h>
using namespace std;
long long n, m, MMH, mmh;
inline void dg(long long n, long long ans, long long m, long long v) {
  if (n == 0) {
    if (ans > mmh || (ans == mmh && v > MMH)) mmh = ans, MMH = v;
    return;
  }
  while (n < m * m * m) m--;
  dg(n - ((m) * (m) * (m)), ans + 1, m, v + ((m) * (m) * (m)));
  if (m > 1)
    dg(((m) * (m) * (m)) - ((m - 1) * (m - 1) * (m - 1)) - 1, ans + 1, m,
       v + ((m - 1) * (m - 1) * (m - 1)));
}
int main() {
  scanf("%I64d", &n);
  dg(n, 0, 1e5, 0);
  printf("%I64d %I64d\n", mmh, MMH);
}
