#include <bits/stdc++.h>
inline long long cube(long long x) { return x * x * x; }
int main() {
  long long maxVolume = 0, i, minVolume = 0, minVolumeTop = 0;
  std::cin >> maxVolume;
  for (i = 1; cube(i + 1) < maxVolume; i++) {
    long long curr = cube(i), next = cube(i + 1);
    long long n = (next - minVolume - 1) / curr;
    if (n > 0) {
      minVolume += curr * n;
      minVolumeTop = i;
    }
  }
  long long resultVolume = 0, resultCount = 0;
  for (; i > 1; i--) {
    long long curr = i * i * i, next = cube(i - 1);
    long long mod = maxVolume % curr;
    if (mod >= minVolume - cube(minVolumeTop)) {
      resultCount += maxVolume / curr;
      resultVolume += maxVolume - mod;
      maxVolume = mod;
    } else {
      resultCount += (maxVolume / curr - 1);
      resultVolume += (maxVolume / curr - 1) * curr;
      maxVolume = curr - 1;
    }
    minVolume -= (minVolume / next) * next;
    while (cube(minVolumeTop) > minVolume) minVolumeTop--;
  }
  if (maxVolume > 7) maxVolume = 7;
  resultCount += maxVolume;
  resultVolume += maxVolume;
  std::cout << resultCount << ' ' << resultVolume << std::endl;
  return 0;
}
