#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> best;
long long power(long long x) { return (x * x * x); }
void initialize() {
  best.first = -1;
  best.second = -1;
}
void dfs(long long m, long long steps, long long x) {
  if (!m) {
    best = max(best, make_pair(steps, x));
    return;
  }
  long long a = 1;
  while (power(a + 1) <= m) a++;
  dfs(m - power(a), steps + 1, x + power(a));
  if (a - 1 > 0) dfs(power(a) - 1 - power(a - 1), steps + 1, x + power(a - 1));
}
int main() {
  long long m;
  while (cin >> m) {
    initialize();
    dfs(m, 0, 0);
    printf("%lld %lld\n", best.first, best.second);
  }
  return 0;
}
