#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long P(long long x) { return x * x * x; }
void solve(long long m, long long c, long long s) {
  if (m == 0) {
    ans = max(ans, make_pair(c, s));
    return;
  }
  int x = 0;
  while (P(x + 1) <= m) x++;
  solve(m - P(x), c + 1, s + P(x));
  if (x - 1 >= 0) solve(P(x) - 1 - P(x - 1), c + 1, s + P(x - 1));
}
int main() {
  long long m;
  scanf("%lld", &m);
  solve(m, 0, 0);
  printf("%lld %lld\n", ans.first, ans.second);
  return 0;
}
