#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
long long int getQube(long long int n) { return (n * n * n); }
pair<long long int, long long int> rec(long long int rem, long long int taken,
                                       long long int sum) {
  if (rem == 0) {
    return make_pair(taken, sum);
  }
  long long int i;
  pair<long long int, long long int> ret;
  for (i = 0; getQube(i + 1) <= rem;) ++i;
  ret = rec(rem - getQube(i), taken + 1, sum + getQube(i));
  if (i > 1) {
    ret = max(ret, rec(getQube(i) - 1 - getQube(i - 1), taken + 1,
                       sum + getQube(i - 1)));
  }
  return ret;
}
int main() {
  long long int n, i, j, k;
  pair<long long int, long long int> ans;
  while (scanf("%lld", &n) == 1) {
    ans = rec(n, 0, 0);
    printf("%lld %lld\n", ans.first, ans.second);
  }
  return 0;
}
