$i+=/ /,$`-$'*3e4<5e5or$r=YES." $i"x6for<>;print$r||NO,$/