using System; namespace yukicoder { class Program { static void Main() { string[] s = Console.ReadLine().Split(' '); string[] t = Console.ReadLine().Split(' '); long K = long.Parse(s[1]); long C = 0; for (int i = 0; i < t.Length; i++) { if (long.Parse(t[i]) != i + 1) C++; } C /= 2; Console.WriteLine((K - C) % 2 == 0 ? "YES" : "NO"); Console.ReadLine(); } } }