#include <bits/stdc++.h>
using namespace std;
long long mx, mx2;
void solve(long long m, long long blocks, long long sum) {
  if (m == 0) {
    if (blocks > mx) {
      mx = blocks;
      mx2 = sum;
    } else if (blocks == mx && sum > mx2) {
      mx2 = sum;
    }
    return;
  }
  long long x = 1;
  while ((x + 1) * (x + 1) * (x + 1) <= m) x++;
  solve(m - x * x * x, blocks + 1, sum + x * x * x);
  solve(x * x * x - 1 - (x - 1) * (x - 1) * (x - 1), blocks + 1,
        sum + (x - 1) * (x - 1) * (x - 1));
}
int main() {
  long long m;
  cin >> m;
  solve(m, 0, 0);
  cout << mx << " " << mx2 << endl;
  return 0;
}
