#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> ans;
long long m;
long long tr(long long x) { return x * x * x; }
void dfs(long long ret, long long num, long long val) {
  if (ret <= 7) {
    ans = max(ans, make_pair(num + ret, val + ret));
    return;
  }
  int tmp = 0;
  while (tr(tmp + 1) <= ret) tmp++;
  dfs(ret - tr(tmp), num + 1, val + tr(tmp));
  tmp--;
  if (tmp > 0) dfs(tr(tmp + 1) - 1 - tr(tmp), num + 1, val + tr(tmp));
}
int main() {
  cin >> m;
  ans.first = ans.second = 0;
  dfs(m, 0, 0);
  cout << ans.first << " " << ans.second << endl;
}
