#include
#include
using namespace std;
int main() {
double x, eps, y;
int k = 0;
cin >> x >> eps;
double y1 = x;
while (1 == 1) {
k++;
y = (y1 + x / y1) / 2;
if (abs(y - y1) <= eps)</p>
break;
y1 = y;
}
cout.precision(15);
cout << y << " " << sqrt(x) << " " << k << endl;</p>
return 0;
}