using System; using System.Linq; namespace y { class Program { static void Main(string[] args) { string[] ss = Console.ReadLine().Split(); int n = int.Parse(ss[0]); int k = int.Parse(ss[1]); var a = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); int z = a.Count(x => x == 0); int w = 0; int l = z; foreach (var item in a) { if (item == 0) continue; if (item % (k + 1) == 0) { l++; } else { w++; } } var ans = w ^ l; Console.WriteLine((ans % 2) == 0 ? "YES" : "NO"); } } }