import std.stdio, std.string, std.conv, std.algorithm; import std.range, std.array, std.math, std.typecons; immutable int inf = 10^^9 + 7; int x, y; int n; int[] a; void main() { scan(x, y); scan(n); a = readln.split.to!(int[]); foreach (i ; 0 .. n - 1) { if (a[i] * y > x * a[i + 1]) { writeln("NO"); return; } } "YES".writeln; } void scan(T...)(ref T args) { auto line = readln.split; foreach (ref arg ; args) { arg = line.front.to!(typeof(arg)); line.popFront(); } assert(line.empty); }