long k;d,c;main(a){for(scanf("%*d%ld",&k);~scanf("%d",&d);a++)c+=a!=d;a=!puts((k- -~c/2)%2?"NO":"YES");}