#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;

int main(){
    while(1){
	double q;
	cin >> q;
	if(q == -1)return 0;
	double a = q / 2;
	for(int i = 0;i < 50000000;i++){
	    a = a - (a*a*a - q)/(3*a*a);
	}
	printf("%.9lf\n", a);
	cout << a * a * a << endl;
    }
}