/*
2010 2011
18612 18623
5 10
12 29
q
Press any key to continue
*/
#include?<stdio.h>#include?<math.h>
int?main()?{
double?n,nactor,sum,item;
int?a,b;
while(scanf("%d%d",&a,&b)?==?2)?{
nactor?=?1;
n?=?1;
sum?=?0;
item?=?1;
while(sum?<=?a)?{
sum?+=?item;
++n;
nactor?+=?1/n;
item?=?1/nactor;
}
printf("%g?",n);
while(sum?<=?b)?{
sum?+=?item;
++n;
nactor?+=?1/n;
item?=?1/nactor;
}
printf("%g\n",n);
}
return?0;
}