using System; using System.Linq; public class Solution { public static void Main() { 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 = Console.ReadLine().Split(' ').Select(int.Parse).ToList(); a.Insert(0, 0); bool lost = false; for (int i = 1; i < n; i++) { a[i] += a[i - 1]; var xPos = a[i - 1]; var t = xPos / (double)x; var yPos = y * t; if (yPos > a[i]) { lost = true; } } Console.WriteLine(lost ? "NO" : "YES"); } }