ll@A,@B;rep(x,1,1d6)if(x%A==B%x)wt(x),break;