#include <bits/stdc++.h>
using namespace std;
map<pair<long long, long long>, pair<long long, long long> > mem;
long long get(long long x, long long m) {
  long long nlim = pow(m, 1.0 / 3);
  while (nlim * nlim * nlim <= m) nlim++;
  nlim--;
  x = min(x, nlim);
  long long v = x * x * x;
  if (v == m) return v;
  long long nxt = (x + 1) * (x + 1) * (x + 1);
  return get(x, min(m - v, nxt - v - 1));
}
pair<long long, long long> solve(long long m, long long lim) {
  long long nlim = pow(m, 1.0 / 3);
  while (nlim * nlim * nlim <= m) nlim++;
  nlim--;
  lim = min(lim, nlim);
  m = min((lim + 1) * (lim + 1) * (lim + 1), m);
  pair<long long, long long> state = make_pair(m, lim);
  if (mem.find(state) != mem.end()) {
    return mem[state];
  }
  pair<long long, long long> ret = make_pair(0, 0);
  for (long long x = lim; x >= 1; x--) {
    long long v = x * x * x;
    if (v > m) continue;
    long long nxt = (x + 1) * (x + 1) * (x + 1);
    if (v == m) {
      ret = max(ret, make_pair(1LL, v));
      continue;
    }
    pair<long long, long long> tmp = solve(min(m - v, nxt - v - 1), x);
    tmp.first++;
    tmp.second += v;
    ret = max(ret, tmp);
    if (nxt - v - 1 < m - v) break;
  }
  return mem[state] = ret;
}
int main() {
  ios::sync_with_stdio(false);
  long long m;
  cin >> m;
  pair<long long, long long> ret = solve(m, 100000);
  cout << ret.first << " " << ret.second << endl;
  return 0;
}
