using System; public class Hello { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var x = int.Parse(line[0]); var y = int.Parse(line[1]); var n = int.Parse(Console.ReadLine().Trim()); line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); for (int i = 0; i < n-1; i++) if (a[i] * y - a[i + 1] * x > 0) { Console.WriteLine("NO"); goto end; } Console.WriteLine("YES"); end:; } }