n,x,y=$<.map &:to_f x==1&&(p 1;exit) a=x (2..n).map{a=x+y*y*a/(1-x*a)} p a