$\=YES;sub g{pop=~$",${X.$_}=$`-$X0,${Y.$_}=$'-$Y0 for($X0=$Y0=0)..3;($X1*$Y2-$Y1*$X2)*($X1*$Y3-$Y1*$X3)<0}sub f{g@_ or g@_[1,2,0,3]or g@_[2,0,1,3]or$\=NO}@z=<>;/(.).*\1/||f@z[/./g]for glob'{0,1,2,3,4}'x4;print