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]; Console.ReadLine(); var a = Console.ReadLine().Split(' ').Select(int.Parse).ToList(); a.Insert(0, 0); bool lost = false; for (int i = 1; i < a.Count; i++) { /* var xPos = a[i - 1]; var t = xPos / (double)x; var yPos = y * t; */ if (y*a[i-1] > x*a[i]) // 誤差対策 yPos > a[i]を変形 { lost = true; break; } } Console.WriteLine(lost ? "NO" : "YES"); } }