i;main(f,b,c){for(;b=c,~scanf("%ms",&c);++i%3||puts(f))f=i%3?strstr(c,b)?f:"NO":"YES";}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page