#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
long long m, cnt;
long long dp[maxn];
map<long long, pair<long long, long long> > mp;
pair<long long, long long> dfs(long long m) {
  if (m == 0) return make_pair(0, 0);
  if (mp.count(m)) return mp[m];
  pair<long long, long long> &tmp1 = mp[m];
  int pos = lower_bound(dp + 1, dp + 1 + cnt, m) - dp;
  if (dp[pos] != m) pos--;
  tmp1 = dfs(m - dp[pos]);
  tmp1.first += 1, tmp1.second += dp[pos];
  pair<long long, long long> tmp2 = dfs(dp[pos] - 1);
  return tmp1 = max(tmp1, tmp2);
}
int main() {
  scanf("%lld", &m);
  for (long long i = 1; 1LL * i * i * i <= m; i++)
    dp[i] = 1LL * i * i * i, cnt = i;
  cnt++;
  dp[cnt] = 1LL * cnt * cnt * cnt;
  pair<long long, long long> res = dfs(m);
  printf("%lld %lld\n", res.first, res.second);
  return 0;
}
