#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
const int inf = 0x3f3f3f3f;
const long double esp = 1e-9;
pair<long long, long long> ans;
void dfs(long long m, long long v, long long x) {
  if (m == 0) {
    ans = max(ans, {x, v});
    return;
  }
  long long t = 1;
  while (pow(t + 1, 3) <= m) t++;
  dfs(m - pow(t, 3), v + pow(t, 3), x + 1);
  if (t - 1) dfs(pow(t, 3) - pow(t - 1, 3) - 1, v + pow(t - 1, 3), x + 1);
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  long long m;
  cin >> m;
  ans = {0, 0};
  dfs(m, 0, 0);
  cout << ans.first << ' ' << ans.second << endl;
  return 0;
}
