let rec f s x y=x*y>0&f(s+x*y)(x-1)(y-1)||()=Printf.printf"%d "s;;while 1=1do Scanf.scanf"%d %d "(f 0)done