#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> st;
void dfs(long long x, long long step, long long sum) {
  if (x == 0) {
    st = max(st, make_pair(step, sum));
    return;
  }
  long long temp = 0;
  while ((temp + 2) * (temp + 2) * (temp + 2) <= x) temp++;
  long long c0 = temp * temp * temp;
  long long c1 = (temp + 1) * (temp + 1) * (temp + 1);
  dfs(c1 - c0 - 1, step + 1, sum + c0);
  dfs(x - c1, step + 1, sum + c1);
}
int main() {
  long long x;
  scanf("%I64d", &x);
  dfs(x, 0, 0);
  printf("%I64d %I64d\n", st.first, st.second);
  return 0;
}
