#include<cstdio>#include<set>#include<vector>#define int long longusingnamespace std;int n, sum =0;int cnt_2, cnt_3;
vector <int> two, three;
set <int> ans;signedmain(){scanf("%lld",&n);int i =1;while(i * i <= n){
two.push_back(i * i);
i++;} cnt_2 = i -1;
i =1;while(i * i * i <= n){
three.push_back(i * i * i);
i++;} cnt_3 = i -1;for(int i =0; i < cnt_2; i++){for(int j =0; j < cnt_3; j++){if(two[i]* three[j]<= n && ans.count(two[i]* three[j])==0) ans.insert(two[i]* three[j]), sum += two[i]* three[j];elsebreak;}}printf("%lld\n%lld\n",(longlong)ans.size(),(longlong)sum);return0;}