import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Queue; import java.util.Scanner; public class YourName2 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int N = s.nextInt(); long K = s.nextLong(); ArrayList D = new ArrayList<>(); for(int i = 0;i C = new ArrayDeque<>(); C.addAll(D); while(C.size() > 0){ int i = C.poll(); int k = D.indexOf(i); while(k != i-1){ int A = D.get(i-1); i = A; K--; C.remove(i); } } if(K > 0&&K%2 == 0){ K = 0; } if(K == 0) System.out.println("YES"); else System.out.println("NO"); } }