#include <bits/stdc++.h>
using namespace std;
long long ansp = 0, ans = 0, m;
long long p(int x) { return (long long)1 * x * x * x; }
void dfs(long long m, long long x, long long y) {
  if (m <= 0) {
    if (x > ansp || (x == ansp && y > ans)) ansp = x, ans = y;
    return;
  }
  int t = 0;
  while (p(t + 1) <= m) t++;
  dfs(m - p(t), x + 1, y + p(t));
  if (t > 1) dfs(p(t) - 1 - p(t - 1), x + 1, y + p(t - 1));
}
int main() {
  scanf("%lld", &m);
  dfs(m, 0, 0);
  printf("%lld %lld", ansp, ans);
  return 0;
}
