#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; bool divisible(vector& c, int l, int r, double param){ double val = 0; double deg = 1; for(int i = l; i <= r; i++){ val += c[i] * deg; deg *= param; } return (abs(val) <= 0.0000001); } int main(){ int n; int a; int b; int q; cin >> n >> a >> b >> q; double atValue = ((double)b /a)*(-1); vector c(n); for(int c_i = 0; c_i < n; c_i++){ cin >> c[c_i]; c[c_i] /= (double)a; } for(int a0 = 0; a0 < q; a0++){ int queryType; int first; int second; cin >> queryType >> first >> second; // your code goes here if(queryType == 1){ c[first] = (double)second/(double)a; }else{ if(divisible(c,first,second,atValue)){ cout << "Yes" << endl; }else{ cout << "No" << endl; } } } return 0; }