#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "Yes" : "No");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
}
void et() {
  puts("-1");
  exit(0);
}
pair<long long, long long> ans = {1, 1};
void cal(long long x, long long cnt, long long z) {
  if (x == 0) {
    ans = max(ans, {cnt, z});
    return;
  }
  long long a = pow(x, 1.0 / 3);
  long long a3 = a * a * a;
  cal(x - a3, cnt + 1, z + a3);
  a--;
  cal(a3 - 1 - a * a * a, cnt + 1, z + a * a * a);
}
void fmain() {
  scanf("%lld", &ln);
  cal(ln, 0, 0);
  printf("%lld %lld\n", ans.first, ans.second);
}
int main() {
  fmain();
  return 0;
}
