/** * @author Ashini Singha * IIT,Jahangirnagar University */ #include using namespace std; #define ll long long int #define fo(i,b,n) for(int i=(b); i<(n) ; i++) #define xx first #define yy second #define pb push_back #define sz(n) int(n.size()) #define pii pair #define MP make_pair #define tp tuple #define MT make_tuple #define gt(x,y) get(y) #define PI acos(-1.0) //read #define read(x) scanf("%d",&x) #define read2(x,y) scanf("%d%d",&x,&y) #define readl(x) scanf("%lld",&x) #define readl2(x,y) scanf("%lld%lld",&x,&y) #define readd(x) scanf("%lf",&x) #define readd2(x,y) scanf("%lf%lf",&x,&y) //write #define pr(n) printf("%d",n) #define prn(n) printf("%d\n",n) #define prl(n) printf("%lld",n) #define prln(n) printf("%lld\n",n) #define prd(x) printf("%lf",x) #define prdn(x) printf("%lf\n",x) #define TC(n) printf("Case %d: ",n) /*______________E_N_D______________*/ ll POW(ll base,int power){ ll ret=1; fo(i,0,power) ret*=base; return ret; } int main() { int n,a,b,m; cin>>n>>a>>b>>m; vectorv; fo(i,0,n){ ll x; cin>>x; v.pb(x); } while(m--) { int t; read(t); if(t==1){ ll x,y; cin>>x>>y; v[x]=y; } else{ int x,y; cin>>x>>y; ll up=0; int cnt=0; int flag=0; for(ll val=1;val<=1000;val++) { ll up=0; int cnt=0; for(int i=x;i<=y;i++) { up+=( v[i] * POW(val,cnt) ); cnt++; } ll down=a*val + b; if(up%down==0){ flag=1; break; } } if(flag)puts("Yes"); else puts("No"); } } return 0; }