#include <bits/stdc++.h>
using namespace std;
inline bool checkBit(long long n, int i) { return n & (1LL << i); }
inline long long setBit(long long n, int i) {
  return n | (1LL << i);
  ;
}
inline long long resetBit(long long n, int i) { return n & (~(1LL << i)); }
int dx[] = {0, 0, +1, -1};
int dy[] = {+1, -1, 0, 0};
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
inline bool isLeapYear(long long year) {
  return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0);
}
vector<long long> store;
void init() {
  for (long long i = 1; i * i * i <= (long long)2e15; ++i)
    store.push_back(i * i * i);
}
pair<long long, long long> func(long long n) {
  ;
  if (n == 0) return pair<long long, long long>(0, 0);
  auto it = upper_bound(store.begin(), store.end(), n);
  --it;
  int i = distance(store.begin(), it);
  int j = max(i - 1, 0);
  pair<long long, long long> p = func(n - store[i]);
  pair<long long, long long> ret(1 + p.first, store[i] + p.second);
  if (i > j) {
    pair<long long, long long> q = func(store[i] - store[j] - 1);
    ret =
        max(ret, pair<long long, long long>(1 + q.first, store[j] + q.second));
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  init();
  long long n;
  cin >> n;
  pair<long long, long long> ans = func(n);
  cout << ans.first << " " << ans.second;
  return 0;
}
