#include <bits/stdc++.h>
using namespace std;
const long long N = 100010;
const int CACHE = 100000;
pair<int, long long> dp[N];
int greed[N];
vector<long long> pows;
long long lowerCube(long long n) {
  auto it = (upper_bound(pows.begin(), pows.end(), n));
  return it - pows.begin() - 1;
}
pair<int, long long> solve(long long n) {
  if (n < CACHE) {
    return dp[n];
  }
  long long c2 = lowerCube(n);
  long long c1 = c2 - 1;
  c2 = c2 * c2 * c2;
  c1 = c1 * c1 * c1;
  pair<int, long long> ra = solve(n - c2);
  pair<int, long long> rb = solve(c2 - c1);
  if (rb.first > ra.first) {
    rb.first++;
    rb.second += c1;
    return rb;
  } else {
    ra.first++;
    ra.second += c2;
    return ra;
  }
}
int main() {
  for (int i = 0; i < N; i++) pows.push_back(1ll * i * i * i);
  ios_base::sync_with_stdio(false);
  memset(dp, -1, sizeof(dp));
  dp[0] = {0, 0};
  for (int i = 1; i < CACHE; i++) {
    long long lc = lowerCube(i);
    greed[i] = greed[i - lc * lc * lc] + 1;
    dp[i] = dp[i - 1];
    if (greed[i] >= dp[i].first) {
      dp[i] = {greed[i], i};
    }
  }
  long long n;
  cin >> n;
  pair<int, long long> res = solve(n);
  cout << res.first << " " << res.second << endl;
  return 0;
}
