#!/usr/bin/env perl use strict; use warnings; my ($x, $y) = split / /,<>; chomp $y; my $n = <>; chomp $n; if ($n <= 2) { print "YES\n"; exit; } my @arr = split/ /,<>; chomp $arr[@arr - 1]; unshift @arr, 0; $n++; my $ratio = $y / $x; my ($xsum, $ysum) = (0, 0); for (my $i = 0; $i < $n - 2; $i++) { my $base = $arr[$i + 1] - $arr[$i]; $xsum += $base; $ysum += $base * $ratio; my $nex = $arr[$i + 2] - $arr[$i + 1]; if ($ysum - $xsum > $nex) { print "NO\n"; exit; } } print "YES\n";