#include using namespace std; main(){ int n; cin >> n; long long int a[n+1]; long long int b[n+1]; a[0]=1; //b[0]=1; for(int i=1;i<=n;i++){ cin >> a[i]; //b[i]=b[i-1]*a[i]; } int q; cin >> q; int p,l,r; for(int i=0;i> p >> l >> r; int x=1; for(int i=l;i<=r;i++){ x=x*a[i]%p; } if( x==0 ){ cout << "Yes" <