#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
map<long long, pair<long long, long long> > mp;
map<long long, bool> vis;
pair<long long, long long> rec(long long m) {
  if (m == 0) return {0, 0};
  if (vis[m]) return mp[m];
  vis[m] = true;
  pair<long long, long long> res = {0, 0};
  long long l = lower_bound(v.begin(), v.end(), -m) - v.begin();
  if (l < v.size()) {
    pair<long long, long long> res1 = rec(m + v[l]);
    res1.first++;
    res1.second -= v[l];
    res = max(res, res1);
    long long t = -v[l] - 1;
    pair<long long, long long> res2 = rec(t);
    res = max(res, res2);
  }
  return mp[m] = res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long m;
  while (cin >> m) {
    for (long long i = 1; i <= 100000; i++) {
      v.push_back(-i * i * i);
    }
    reverse(v.begin(), v.end());
    cout << rec(m).first << " " << rec(m).second << endl;
    v.clear();
    mp.clear();
    vis.clear();
  }
  return 0;
}
