using System; using System.Collections.Generic; using System.Linq; using static System.Console; class Program { static void Main() { var K = int.Parse(ReadLine().Split()[1]); WriteLine(ReadLine().Split().Select(x => int.Parse(x) % (K + 1)).Aggregate((x, y) => x ^ y) != 0 ? "YES" : "NO"); } }