#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int x,y; int n,t; vector a; cin >> x >> y; cin >> n; for(int i=0;i> t; a.push_back(t); } int g = __gcd(x,y); x/=g; y/=g; for(int i=0;i a[j]*x) { cout << "NO" << '\n'; return 0; } } } cout << "YES" << '\n'; return 0; }