#include <bits/stdc++.h>
using namespace std;
int cnt;
long long m, ans;
long long Pow(long long x) { return x * x * x; }
void dfs(long long lim, int l, long long num) {
  if (lim == 0) {
    if (l > cnt) {
      cnt = l;
      ans = num;
    }
    return;
  }
  long long x = 1;
  while (Pow(x + 1) <= lim) x++;
  dfs(lim - Pow(x), l + 1, num + Pow(x));
  if (x > 1) dfs(Pow(x) - 1 - Pow(x - 1), l + 1, num + Pow(x - 1));
}
int main() {
  cin >> m;
  cnt = 0;
  dfs(m, 0, 0);
  cout << cnt << " " << ans;
  return 0;
}
