#include <bits/stdc++.h>
using namespace std;
map<long long, pair<long long, long long>> dp;
void updateMax(pair<long long, long long>& ma, pair<long long, long long> c) {
  if (c.first > ma.first)
    ma = c;
  else if (c.first == c.first)
    ma.second = max(c.second, ma.second);
}
pair<long long, long long> rec(long long m) {
  if (m < 8) {
    pair<long long, long long> res = {m, m};
    return res;
  }
  if (dp.count(m) != 0) return dp[m];
  double r = pow(double(m), 1 / 3.0);
  long long rc = r;
  while ((rc + 1) * (rc + 1) * (rc + 1) <= m) ++rc;
  auto res1 = rec(m - rc * rc * rc);
  ++res1.first;
  res1.second += rc * rc * rc;
  auto res2 = rec(rc * rc * rc - 1 - (rc - 1) * (rc - 1) * (rc - 1));
  ++res2.first;
  res2.second += (rc - 1) * (rc - 1) * (rc - 1);
  pair<long long, long long> res;
  if (res1.first > res2.first) {
    res = res1;
  } else if (res2.first > res1.first) {
    res = res2;
  } else {
    res.first = res1.first;
    res.second = max(res1.second, res2.second);
  }
  dp[m] = res;
  return res;
}
int main(int argc, char* argv[]) {
  std::ios::sync_with_stdio(false);
  long long m;
  cin >> m;
  auto ma = rec(m);
  cout << ma.first << ' ' << ma.second << endl;
  return 0;
}
