#include using namespace std; const double EPS = 1e-9; int main() { double x, y; cin >> x >> y; size_t n; cin >> n; vector a(n); for (double& a_ : a) cin >> a_; x = x / 36 * 10; y = y / 36 * 10; for (size_t i = 0; i < n - 1; i++) { double t = a[i] / x; if (y * t - a[i + 1] > EPS) { puts("NO"); return 0; } } puts("YES"); return 0; }