human
A factory produces thimbles in bulk. Typically, it can produce up to a thimbles a day. However, some of the machinery is defective, so it can currently only produce b thimbles each day. The factory intends to choose a k-day period to do maintenance and construction.
it cannot produce any thimbles during this time, but will be restored to its full production of a thimbles per day after the k days are complete.

Initially, no orders are pending. The factory receives updates of the form di, ai, indicating that ai new orders have been placed for the di-th day. Each order requires a single thimble to be produced on precisely the specified day. The factory may opt to fill as many or as few of the orders in a single batch as it likes.

As orders come in, the factory owner would like to know the maximum number of orders he will be able to fill if he starts repairs on a given day pi. Help the owner answer his questions.

Input

The first line contains five integers n, k, a, b, and q (1 ≤ k ≤ n ≤ 200 000, 1 ≤ b < a ≤ 10 000, 1 ≤ q ≤ 200 000) — the number of days, the length of the repair time, the production rates of the factory, and the number of updates, respectively.

The next q lines contain the descriptions of the queries. Each query is of one of the following two forms: 

  * 1 di ai (1 ≤ di ≤ n, 1 ≤ ai ≤ 10 000), representing an update of ai orders on day di, or 
  * 2 pi (1 ≤ pi ≤ n - k + 1), representing a question: at the moment, how many orders could be filled if the factory decided to commence repairs on day pi? 


It's guaranteed that the input will contain at least one query of the second type.

Output

For each query of the second type, print a line containing a single integer — the maximum number of orders that the factory can fill over all n days.

Examples

Input

5 2 2 1 8
1 1 2
1 5 3
1 2 1
2 2
1 4 2
1 3 2
2 1
2 3

Output

3
6
4

Input

5 4 10 1 6
1 1 5
1 5 5
1 3 2
1 5 2
2 1
2 2

Output

7
1

Note

Consider the first sample.

We produce up to 1 thimble a day currently and will produce up to 2...
The above is tricky. Write me a correct solution in CPP.
assistant
#Here is Python program to print a line containing a single integer — the maximum number of orders that the factory can fill over all n days.

#include <bits/stdc++.h>
using namespace std;
long long int a, b;
struct node {
  long long int pos, pre;
} tree[4 * 200010], def;
node merge(node l, node r) {
  node ans;
  ans.pre = l.pre + r.pre;
  ans.pos = l.pos + r.pos;
  return ans;
}
void update(int ind, int val, int l, int r, int nde) {
  if (l == r) {
    tree[nde].pre = min(tree[nde].pre + val, b);
    tree[nde].pos = min(tree[nde].pos + val, a);
    return;
  }
  int mid = (l + r) >> 1;
  if (ind >= l && ind <= mid)
    update(ind, val, l, mid, nde << 1);
  else
    update(ind, val, mid + 1, r, nde << 1 | 1);
  tree[nde] = merge(tree[nde << 1], tree[nde << 1 | 1]);
}
node query(int x, int y, int l, int r, int nde) {
  if (l > y || r < x || x > y)
    return def;
  else if (l >= x && r <= y)
    return tree[nde];
  int mid = (l + r) >> 1;
  node n1, n2;
  n1 = query(x, y, l, mid, nde << 1);
  n2 = query(x, y, mid + 1, r, nde << 1 | 1);
  return merge(n1, n2);
}
int main() {
  long long int n, k, q, d, val, ty;
  scanf("%lld%lld%lld%lld%lld", &n, &k, &a, &b, &q);
  def = {0, 0};
  for (int i = 0; i < q; i++) {
    scanf("%lld", &ty);
    if (ty == 1) {
      scanf("%lld%lld", &d, &val);
      d--;
      update(d, val, 0, n - 1, 1);
    } else {
      scanf("%lld", &d);
      d--;
      printf("%lld\n", query(0, d - 1, 0, n - 1, 1).pre +
                           query(d + k, n - 1, 0, n - 1, 1).pos);
    }
  }
  return 0;
}