c;main(i,j){for(;scanf("%d,%d,%c%*s",&i,&j,&c)>0;)puts(i-j&&i>j^c<70?"STOP":"WAIT");}
80,90,UP 150,100,DOWN 65,65,UP 1618,1618,DOWN 840,1200,DOWN 54,12,UP 30,1,UP
WAIT WAIT WAIT WAIT STOP STOP STOP
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!