{for(x-$1;(($2)*x+$3)%$1&&x--;);$0=++x?"yes":"no"}a++
5 5 2 5 5 3 2 4 2 1 50 48 49
yes yes no no
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!