ll@t; rep(t){ ll@v,@x,@o,@i,@q,@r,y; y=x+r*(i-o); if(y>v){ wt("Overflow"); }else{ y-=(q-r)*o; if(yx){ wt("Overflow"); }else{ wt("Safe"); } } }