You are given two coprime positive integers $$$p$$$ and $$$q$$$. There are $$$pq$$$ different types of cards, numbered $$$0,1,\ldots,pq-1$$$.
There are two types of standard card packs:
There are now $$$n$$$ cards arranged on the table, where the number of the $$$i$$$-th card is $$$a_i$$$. You need to process $$$Q$$$ operations of the following two types:
Note: When repacking the cards, every card in the interval must belong to exactly one pack, and each kind of standard card pack may be used any number of times.
The first line contains four integers $$$n,p,q,Q$$$ ($$$1\le n,p,q,Q\le 3\times 10^5$$$, $$$2\le p+q\le 3\times 10^5$$$, $$$\gcd(p,q)=1$$$).
The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$0\le a_i \lt pq$$$), denoting the initial number of each card.
The next $$$Q$$$ lines each describe one operation in the form 1 i x or 2 l r:
For each 2 l r operation, if the specified cards can be partitioned exactly into several standard card packs, output YES; otherwise, output NO.
8 2 3 50 0 2 3 4 1 4 22 1 52 6 81 8 52 6 82 6 7
YES NO NO YES
When $$$p=2,q=3$$$:
For the first query, the multiset of cards in the interval is $$$\{0,0,2,3,4\}$$$. It can be partitioned into $$$\{0,2,4\}+\{0,3\}$$$, so the answer is YES.
For the last query, the multiset of cards in the interval is $$$\{1,4\}$$$. It forms exactly one Type-2 standard card pack, so the answer is YES.