#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int cmx = 1e5 + 5;
pair<long long, long long> best;
long long power(long long x) { return x * x * x; }
void sol(long long m, long long steps, long long sum) {
  if (m == 0) {
    best = max(best, make_pair(steps, sum));
    return;
  }
  long long x = 0;
  while (power(x + 1) <= m) x++;
  sol(m - power(x), steps + 1, sum + power(x));
  if ((x - 1) >= 0)
    sol(power(x) - 1 - power(x - 1), steps + 1, sum + power(x - 1));
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long m;
  cin >> m;
  sol(m, 0, 0);
  cout << best.first << " " << best.second << '\n';
  return 0;
}
