#include using namespace std; #define INF 2000000000 #define MOD 1000000007 typedef long long ll; typedef pair P; int main() { double x, y; cin >> x >> y; x = x * 60 / 60; y = y * 60 / 60; int n; cin >> n; double a[n]; for (int i = 0; i < n; i++) { double tmp; cin >> tmp; a[i] = tmp/1000; } for (int i = 0; i < n-1; i++) { double t = a[i]/x; // cerr << "d_t: " << t << " " << t*y << endl; double shisyo = t * y; if (shisyo>a[i+1]) { cout << "NO" << "\n"; return 0; } } cout << "YES" << "\n"; return 0; }