#include <bits/stdc++.h>
using namespace std;
long long int A[100010];
long long int B[100010];
int main() {
  long long int m;
  vector<long long int> C;
  for (int i = 0; i < 100005; i++) A[i] = 1ll * i * 1ll * i * 1ll * i;
  for (int i = 2; i < 100005; i++) B[i] = A[i] - A[i - 1];
  scanf("%I64d", &m);
  long long int res = 0, tot = 0, up;
  for (int i = 1; i < 100002; i++) {
    long long int temp = min(A[i + 1] - 1, m) - res;
    res += (temp / A[i]) * A[i];
    tot += (temp / A[i]);
    for (int j = 0; j < temp / A[i]; j++) C.push_back(i);
    if (res + A[i + 1] > m) break;
  }
  up = C.size();
  long long int left = 100000ll;
  left *= 100000ll;
  left *= 100000ll;
  long long int temp = res;
  for (int i = up - 1; i >= 0; i--) {
    if ((B[C[i] + 1] <= m - res) && (B[C[i] + 1] <= left)) {
      int j = C[i];
      while ((B[C[i] + 1] <= m - res) && (B[C[i] + 1] <= left)) {
        res += B[j + 1];
        temp += B[j + 1];
        left -= B[j + 1];
        C[i] = j + 1;
        j++;
      }
    }
    left = min(min(left, m - res), A[C[i] + 1] - temp);
    temp = temp - A[C[i]];
  }
  printf("%I64d %I64d\n", tot, res);
  return 0;
}
