#include <bits/stdc++.h>
using namespace std;
int chk[67];
pair<int, long long> sub(long long m, long long cnt, long long sum) {
  long long d = (long long)cbrtl((long double)m);
  if (m == 0) return make_pair(cnt, sum);
  pair<int, long long> tmp = sub(m - d * d * d, cnt + 1, sum + d * d * d);
  tmp = max(tmp, sub(d * d * d - 1 - (d - 1) * (d - 1) * (d - 1), cnt + 1,
                     sum + (d - 1) * (d - 1) * (d - 1)));
  return tmp;
}
int main() {
  long long m;
  scanf("%I64d", &m);
  pair<int, long long> ans = sub(m, 0, 0);
  printf("%d %I64d", ans.first, ans.second);
  return 0;
}
