#include using namespace std; int main() { int x, y, n, i,a; cin >> x >> y >> n; cout << n; for (i = 0; i < n; i++) { cin >> a; if ((((x%a == 2 && y%a == 0) || (x%a == 0 && y%a == 2))&& (x*y%a == 0))||a==1) cout << "YES" << endl; else cout << "NO" << endl; } }