#include <bits/stdc++.h>
using namespace std;
int const MAXN = 5005;
const long long INF = 1e-18;
vector<long long> cubo;
pair<long long, long long> ans(-INF, -INF);
void solve(long long m, long long acc, long long block) {
  if (m <= 7) {
    ans = max(ans, pair<long long, long long>(block + m, acc + m));
    return;
  }
  int idx = upper_bound(cubo.begin(), cubo.end(), m) - cubo.begin();
  idx--;
  solve(m - cubo[idx], acc + cubo[idx], block + 1);
  if (idx > 0)
    solve(cubo[idx] - 1 - cubo[idx - 1], acc + cubo[idx - 1], block + 1);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (long long i = 0; i < 1000 * 100 + 7; ++i)
    if (i) cubo.push_back(i * i * i);
  long long m;
  cin >> m;
  solve(m, 0, 0);
  cout << ans.first << ' ' << ans.second;
  return 0;
}
