#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long my_pow(long long x) { return x * x * x; }
void solve(long long m, long long step, long long sub) {
  if (m == 0) {
    ans = max(ans, make_pair(step, sub));
    return;
  }
  long long x = 1;
  while (my_pow(x) <= m) x++;
  x--;
  solve(m - my_pow(x), step + 1, sub + my_pow(x));
  if (x - 1 >= 0)
    solve(my_pow(x) - 1 - my_pow(x - 1), step + 1, sub + my_pow(x - 1));
}
int main() {
  long long n;
  cin >> n;
  solve(n, 0, 0);
  cout << ans.first << " " << ans.second;
}
