double a;
cin >> a;
double sum=1;
int k=1;
while (sum<=a){
k++;
sum=sum+1/(k*1.0);
}
cout << k << " " << sum;
double a;
cin >> a;
double sum=1;
int k=1;
while (sum<=a){
k++;
sum=sum+1/(k*1.0);
}
cout << k << " " << sum;