#include <bits/stdc++.h>
using namespace std;
pair<int, long long> da;
inline long long p(long long x) { return x * x * x; }
long long m;
void dfs(long long now, int sum, long long maxnum) {
  if (!now)
    da = max(da, make_pair(sum, maxnum));
  else {
    long long i = 1;
    for (; p(i + 1) <= now; ++i)
      ;
    dfs(now - p(i), sum + 1, maxnum + p(i));
    if (now) dfs(p(i) - p(i - 1) - 1, sum + 1, maxnum + p(i - 1));
  }
}
int main() {
  scanf("%lld", &m);
  dfs(m, 0, 0);
  printf("%d %lld", da.first, da.second);
}
