#include <bits/stdc++.h>
using namespace std;
pair<int, int64_t> ans = {0, 0};
int64_t pow3(int64_t x) { return x * x * x; }
void dfs(int64_t X, int box, int64_t V) {
  ans = max(ans, make_pair(box, V));
  if (X == 0) return;
  int a = 1;
  while (pow3(a + 1) <= X) a++;
  dfs(X - pow3(a), box + 1, V + pow3(a));
  dfs(pow3(a) - 1 - pow3(a - 1), box + 1, V + pow3(a - 1));
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int64_t X;
  cin >> X;
  dfs(X, 0, 0);
  cout << ans.first << " " << ans.second << endl;
}
