using System; using System.Linq; class Solution { static void Main(string[] args) { var vals = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); int x = vals[0]; int y = vals[1]; int n = int.Parse(Console.ReadLine()); var a = new int[n]; for (int i = 0; i < n; i++) { a[i] = int.Parse(Console.ReadLine()); } bool lost = false; for (int i = 1; i < n; i++) { a[i] += a[i - 1]; var xPos = a[i - 1]; var t = xPos / x; var yPos = y * t; if (yPos > a[i]) { lost = true; } } Console.WriteLine(lost ? "YES" : "No"); } }