#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
void work(long long m, long long cnt, long long tot) {
  if (!m) {
    ans = max(ans, make_pair(cnt, tot));
    return;
  }
  long long x = 1;
  for (; x * x * x <= m; x++)
    ;
  x--;
  work(m - x * x * x, cnt + 1, tot + x * x * x);
  if (x - 1 >= 0)
    work(x * x * x - 1 - (x - 1) * (x - 1) * (x - 1), cnt + 1,
         tot + (x - 1) * (x - 1) * (x - 1));
}
int main() {
  long long m;
  cin >> m;
  work(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
