WA=1 TLE=2 MLE=3 OLE=4 RE=5 r=(No Yes) read while read -aa;do read -ab read x z=0 : $[i={1..5},z|=i==x?a[i]:b[i]] echo ${r[!z]} done