#include <bits/stdc++.h>
long long mpow(long long a, long long n, long long mod) {
  long long ret = 1;
  long long b = a;
  while (n) {
    if (n & 1) ret = (ret * b) % mod;
    b = (b * b) % mod;
    n >>= 1;
  }
  return (long long)ret;
}
using namespace std;
using namespace std;
pair<long long, long long> ans;
long long m_pow(long long p) { return p * p * p; }
void rec(long long m, long long steps, long long sub) {
  if (m == 0) {
    ans = max(ans, make_pair(steps, sub));
    return;
  }
  long long x = 1;
  while (m_pow(x + 1) <= m) x++;
  rec(m - m_pow(x), steps + 1, sub + m_pow(x));
  rec(m_pow(x) - 1 - m_pow(x - 1), steps + 1, sub + m_pow(x - 1));
}
void solve() {
  long long m;
  cin >> m;
  rec(m, 0, 0);
  cout << ans.first << " " << ans.second;
}
int main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
