#include <bits/stdc++.h>
using namespace std;
long long m;
map<long long, pair<int, long long> > g;
pair<int, long long> solve(long long x) {
  if (x == 0) {
    return make_pair(0, 0);
  }
  if (g.find(x) != g.end()) {
    return g[x];
  }
  long long a = cbrt(x);
  long long b = a - 1;
  pair<int, long long> ret1 = solve(x - a * a * a);
  pair<int, long long> ret2 = solve(a * a * a - 1);
  if (ret1.first + 1 >= ret2.first) {
    g[x] = make_pair(ret1.first + 1, ret1.second + a * a * a);
  } else {
    g[x] = ret2;
  }
  return g[x];
}
int main() {
  cin >> m;
  pair<int, long long> ans = solve(m);
  cout << ans.first << ' ' << ans.second << endl;
  return 0;
}
