#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
pair<long long, long long> ans;
long long m;
void solve(long long m, long long num, long long val) {
  if (!m) {
    ans = max(ans, make_pair(num, val));
    return;
  }
  long long t = 1;
  while ((t + 1) * (t + 1) * (t + 1) <= m) t++;
  solve(m - (t) * (t) * (t), num + 1, val + (t) * (t) * (t));
  if (t - 1 >= 0)
    solve((t) * (t) * (t)-1 - (t - 1) * (t - 1) * (t - 1), num + 1,
          val + (t - 1) * (t - 1) * (t - 1));
}
int main() {
  m = read();
  solve(m, 0, 0);
  printf("%lld %lld\n", ans.first, ans.second);
  return 0;
}
