#include <bits/stdc++.h>
using namespace std;
signed long long M;
map<signed long long, pair<signed long long, signed long long>> MM;
pair<signed long long, signed long long> dfs(signed long long v) {
  pair<signed long long, signed long long> ret = {0, 0};
  if (MM.count(v)) return MM[v];
  if (v <= 100) {
    signed long long orgv = v;
    for (int i = 1; i <= v; i++) {
      signed long long tv = i;
      signed long long num = 0;
      for (int j = 4; j >= 1; j--) {
        num += tv / (j * j * j);
        tv %= (j * j * j);
      }
      ret = max(ret, {num, i});
    }
    MM[v] = ret;
  } else {
    signed long long cu = pow(v, 1.0 / 3);
    while ((cu + 1) * (cu + 1) * (cu + 1) <= v) cu++;
    while (cu * cu * cu > v) cu--;
    auto rr = dfs(v - cu * cu * cu);
    ret = {rr.first + 1, rr.second + cu * cu * cu};
    auto rr2 = dfs(cu * cu * cu - 1);
    ret = max(ret, rr2);
    MM[v] = ret;
  }
  return ret;
}
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> M;
  pair<signed long long, signed long long> ret = dfs(M);
  cout << ret.first << " " << ret.second << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
