#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> best;
long long p(long long x) { return x * x * x; }
void dfs(long long sum, long long cnt, long long v) {
  if (sum == 0) {
    best = max(best, make_pair(cnt, v));
    return;
  }
  long long x = 1;
  while (p(x + 1) <= sum) x++;
  dfs(sum - p(x), cnt + 1, v + p(x));
  if (x - 1 >= 1) {
    dfs(p(x) - 1 - p(x - 1), cnt + 1, v + p(x - 1));
  }
  return;
}
int main() {
  long long m;
  cin >> m;
  dfs(m, 0, 0);
  cout << best.first << " " << best.second << endl;
  return 0;
}
