#include <bits/stdc++.h>
using namespace std;
long long sum = 0;
pair<int, long long> left(long long cur) {
  if (cur <= 7) {
    return make_pair(cur, cur);
  }
  long long t = 1;
  while (t * t * t <= cur) {
    t++;
  }
  t--;
  long long one = cur - (t * t * t);
  long long k = t - 1;
  long long two = (t * t * t) - (k * k * k) - 1;
  pair<int, long long> b1 = left(one);
  pair<int, long long> b2 = left(two);
  b1.first++;
  b2.first++;
  b1.second += t * t * t;
  b2.second += k * k * k;
  return max(b1, b2);
}
int main() {
  long long m = 999;
  cin >> m;
  pair<int, long long> box = left(m);
  cout << box.first << " " << box.second;
}
