#include #include using namespace std; int main() { int x, y, n; double a; vector v; double xx, yy; double d = 0; double dv = 0; double t; cin >> x >> y >> n; xx = x * 1000.0 / 60.0 / 60.0; yy = y * 1000.0 / 60.0 / 60.0; dv = yy - xx; for (int i = 0; i < n; i++) { cin >> a; v.push_back(a); } for (int i = 0; i < n - 1; i++) { t = v[i] / xx; d += dv * t; if (d > v[i + 1]) { cout << "NO" << endl; break; } if (i == n - 2) { cout << "YES" << endl; } } }