#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const long long mod = 1e9 + 7;
void solve();
signed main() {
  srand('V' + 'a' + 'n' + 'k' + 'a' + 'T' + 'a' + 'g' + 'a' + 'n' + 'a' + 'i');
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
pair<long long, long long> ans;
long long my_pow(long long x) { return x * x * x; }
void rec(long long m, long long steps, long long subtracted) {
  if (m == 0) {
    ans = max(ans, make_pair(steps, subtracted));
    return;
  }
  long long x = 1;
  while (my_pow(x + 1) <= m) ++x;
  rec(m - my_pow(x), steps + 1, subtracted + my_pow(x));
  if (x - 1 >= 0)
    rec(my_pow(x) - 1 - my_pow(x - 1), steps + 1, subtracted + my_pow(x - 1));
}
void solve() {
  long long m;
  cin >> m;
  rec(m, 0, 0);
  cout << ans.first << " " << ans.second;
  return;
}
