using System; namespace yukicoder { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); string[] t = Console.ReadLine().Split(' '); long K = long.Parse(s[1]); long C = 0; long[] p = new long[long.Parse(s[0])]; for (int i = 0; i < t.Length; i++) p[i] = long.Parse(t[i]); for (int i = 0; i < p.Length; i++) { long min = p[i]; long index = 0; for (int j = i;j < p.Length; j++) { if(min > p[j]) { min = p[j]; index = j; } } if(p[i] != min) { long tmp = p[i]; p[i] = p[index]; p[index] = tmp; C++; } } if((K - C) % 2 == 0) { Console.WriteLine("{0}", "YES"); } else { Console.WriteLine("{0}", "NO"); } //Console.ReadLine(); } } }