#include <bits/stdc++.h>
using namespace std;
const int Inf = 1e9 + 7;
pair<long long, long long> best;
inline long long cub(long long x) { return x * x * x; }
void rec(long long m, long long step, long long tot) {
  if (m == 0) {
    best = max(best, make_pair(step, tot));
    return;
  }
  long long k = 1;
  while (cub(k + 1) <= m) ++k;
  rec(m - cub(k), step + 1, tot + cub(k));
  if (k >= 1) rec(cub(k) - 1 - cub(k - 1), step + 1, tot + cub(k - 1));
}
void solve() {
  long long m;
  cin >> m;
  rec(m, 0, 0);
  cout << best.first << " " << best.second << '\n';
}
int main() {
  ios_base::sync_with_stdio(true);
  cin.tie(0);
  cout.precision(12);
  cout << fixed;
  solve();
  return 0;
}
