#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans = {0, 0};
long long pw3(long long x) { return x * x * x; }
void dfs(long long m, long long num, long long v) {
  if (m == 0) ans = max(ans, {num, v});
  if (m <= 0) return;
  long long x = 1;
  while (pw3(x + 1) <= m) x++;
  dfs(m - pw3(x), num + 1, v + pw3(x));
  if (x > 1) dfs(pw3(x) - 1 - pw3(x - 1), num + 1, v + pw3(x - 1));
}
int main() {
  long long m;
  scanf("%I64d", &m);
  dfs(m, 0, 0);
  printf("%I64d %I64d", ans.first, ans.second);
  return 0;
}
