#include <bits/stdc++.h>
using namespace std;
long long cube(int c) { return c * 1LL * c * c; }
long long getBiggestCube(long long m) {
  int l = 1, r = 1e5 + 10;
  int ans = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    long long mid1 = cube(mid);
    if (mid1 == m) {
      ans = mid;
      break;
    }
    if (mid1 > m) {
      r = mid - 1;
    } else {
      ans = max(ans, mid);
      l = mid + 1;
    }
  }
  return ans;
}
pair<int, long long> getAns(long long m) {
  if (m == 1) return make_pair(1, 1);
  if (m == 0) return make_pair(0, 0);
  int c = getBiggestCube(m);
  pair<int, long long> p1 = getAns(m - cube(c));
  pair<int, long long> p2 = getAns(cube(c) - 1 - cube(c - 1));
  if (p1.first == p2.first) {
    if (cube(c) + p1.second > cube(c - 1) + p2.second)
      return make_pair(p1.first + 1, p1.second + cube(c));
    else
      return make_pair(p2.first + 1, p2.second + cube(c - 1));
  } else {
    if (p1.first > p2.first) {
      return make_pair(p1.first + 1, p1.second + cube(c));
    } else {
      return make_pair(p2.first + 1, p2.second + cube(c - 1));
    }
  }
}
int main() {
  long long m;
  cin >> m;
  pair<int, long long> ans = getAns(m);
  cout << ans.first << " " << ans.second << endl;
}
