#include <bits/stdc++.h>
using namespace std;
long long v[100005];
void init() {
  for (long long i = 0; i <= 1e5 + 1; i++) v[i] = i * i * i;
}
pair<int, long long> dfs(long long m) {
  if (m == 0) return pair<int, long long>(0, 0);
  int a = 1;
  while (v[a] <= m) a++;
  a--;
  pair<int, long long> t1 = dfs(m - v[a]), t2 = dfs(v[a] - 1 - v[a - 1]), ans;
  if (t1.first >= t2.first) {
    ans.first = t1.first + 1;
    ans.second = t1.second + v[a];
  } else {
    ans.first = t2.first + 1;
    ans.second = t2.second + v[a - 1];
  }
  return ans;
}
int main() {
  long long m;
  init();
  cin >> m;
  pair<int, long long> ans = dfs(m);
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
