#include <bits/stdc++.h>
using namespace std;
long long M = 0, MX = 0;
void Rec(int k, long long a, long long S) {
  long long sq = pow(a, 1 / 3), d;
  while (sq * sq * sq < a) {
    sq++;
  }
  while (sq * sq * sq > a) {
    sq--;
  }
  if (a == 0) {
    if (k > M) {
      M = k;
      MX = S;
    } else if (k == M && S > MX) {
      MX = S;
    }
    return;
  }
  d = sq * sq * sq;
  Rec(k + 1, a - d, S + d);
  if (sq > 1) {
    d = (sq - 1) * (sq - 1) * (sq - 1);
    Rec(k + 1, sq * sq * sq - 1 - d, S + d);
  }
}
int main() {
  long long m;
  cin >> m;
  Rec(0, m, 0);
  cout << M << " " << MX;
  return 0;
}
