#include <bits/stdc++.h>
const int maxn = 100007;
long long cub[maxn], count;
std::map<long long, std::pair<int, long long> > dp;
std::pair<int, long long> find(long long x) {
  if (x <= 7) return {x, x};
  int x1, x2;
  long long y1, y2;
  count++;
  if (dp.find(x) != dp.end()) return dp[x];
  int k = std::upper_bound(cub, cub + 100003, x) - cub - 1;
  std::tie(x1, y1) = find(x - cub[k]);
  std::tie(x2, y2) = find(cub[k] - 1);
  return dp[x] = std::max(std::make_pair(x1 + 1, y1 + cub[k]),
                          std::make_pair(x2, y2));
}
int main() {
  long long m;
  std::cin >> m;
  for (long long i = 1; i < maxn; i++) {
    cub[i] = i * i * i;
  }
  auto ans = find(m);
  std::cout << ans.first << ' ' << ans.second << '\n';
}
