#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long N = 1e5 + 100;
long long a[N];
long long f(long long x) {
  long long y = upper_bound(a + 1, a + 1 + N, x) - a;
  y--;
  long long ret = 0;
  while (x) {
    while (x >= a[y]) {
      x -= a[y];
      ret++;
    }
    if (y < 20)
      y--;
    else
      y = upper_bound(a + 1, a + 1 + N, x) - a - 1;
  }
  return ret;
}
pair<long long, long long> ans;
void rec(long long x, long long d, long long kek) {
  if (x == 0) {
    ans = max(ans, {d, kek});
    return;
  }
  long long y = upper_bound(a + 1, a + 1 + N, x) - a - 1;
  assert(y);
  rec(x - a[y], d + 1, kek + a[y]);
  if (y >= 1) rec(a[y] - 1 - a[y - 1], d + 1, kek + a[y - 1]);
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long m;
  cin >> m;
  for (long long i = 1; i < N; i++) {
    a[i] = i * i * i;
  }
  rec(m, 0, 0);
  cout << ans.first << ' ' << ans.second << '\n';
}
