#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 123;
const long long INF = (long long)1e18 + 123;
const int inf = (int)1e9 + 123;
long long m, mx, mx_a;
void rec(long long now, long long cnt, long long sum) {
  if (cnt == mx)
    if (mx_a < sum) mx_a = sum;
  if (cnt > mx) {
    mx_a = sum;
    mx = cnt;
  }
  if (now < 1) return;
  long long a = ceil(pow(now, 1 / 3.0));
  if (a * a * a > now) a--;
  if (now - a * a * a >= 0) rec(now - a * a * a, cnt + 1, sum + a * a * a);
  if (a * a * a - 1 - (a - 1) * (a - 1) * (a - 1) >= 0)
    rec(a * a * a - 1 - (a - 1) * (a - 1) * (a - 1), cnt + 1,
        sum + (a - 1) * (a - 1) * (a - 1));
}
int main() {
  cin >> m;
  rec(m, 0, 0);
  cout << mx << " " << mx_a;
  return 0;
}
