#include <bits/stdc++.h>
const int INF = 100000000;
const double EPS = 1e-10;
const int MOD = 1000000007;
using namespace std;
long long m;
map<long long, pair<long long, long long> > dp;
long long num[100001];
long long s;
pair<long long, long long> dfs(long long x, long long d) {
  if (x == 0 || d == 0) return pair<long long, long long>(0, 0);
  if (dp.count(x)) return dp[x];
  while (x < num[d]) d--;
  pair<long long, long long> ret1 = dfs(x - num[d], d);
  pair<long long, long long> ret2 = dfs(num[d] - 1 - num[d - 1], d - 1);
  ret1.first++;
  ret2.first++;
  ret1.second += num[d];
  ret2.second += num[d - 1];
  if (ret1 < ret2) ret1 = ret2;
  dp[x] = ret1;
  return ret1;
}
int main() {
  cin >> m;
  if (m <= 7) {
    cout << m << " " << m << endl;
    return 0;
  }
  for (long long i = 1; i <= 100000; i++) num[i] = i * i * i;
  pair<long long, long long> ans = dfs(m, 100000);
  cout << ans.first << " " << ans.second << endl;
}
