#include <bits/stdc++.h>   using namespace std;   const long long mod = 1000000007;   std::pair<long long, long long> go(long long m) {     long long cur = 1;     long long cur3 = 1;     long long cur13 = 8;     long long h = 0;     long long num = 0;     std::vector<long long> what;     while (1) {       while (h + cur3 >= cur13) {         if (cur3 > m) break;         cur++;         cur3 = cur13;         cur13 = (cur + 1) * (cur + 1) * (cur + 1);       }       if (h + cur3 > m) break;       h += cur3;       what.push_back(cur3);       num++;     }     std::vector<long long> ch(num + 1, 0);     long long sum = 0;     for (int i = 0; i < num; i++) {       sum += what[i];       ch[i + 1] = sum;     }     cur = 1;     while (cur * cur * cur <= m) cur++;     long long left = m;     long long ans = 0;     deque<long long> revans;     for (int step = num - 1; step >= 0; step--) {       cur++;       while (1) {         cur--;         if (ch[step] + cur * cur * cur > left) continue;         long long cum = ch[step] + cur * cur * cur;         bool f = false;         for (int i = 0; i < revans.size(); i++) {           cum += revans[i] * revans[i] * revans[i];           long long ra3 = (revans[i] + 1) * (revans[i] + 1) * (revans[i] + 1);           if (cum >= ra3) {             f = true;             break;           }         }         if (!f) break;       }       revans.push_front(cur);       cur3 = cur * cur * cur;       left -= cur3;       ans += cur3;     }     return make_pair(num, ans);   }   int main() {     long long m;     cin >> m;     std::pair<long long, long long> x = go(m);     cout << x.first <<     << x.second;   }   