Problem: One day two students, Grisha and Diana, found themselves in the university chemistry lab. In the lab the students found n test tubes with mercury numbered from 1 to n and decided to conduct an experiment.

The experiment consists of q steps. On each step, one of the following actions occurs:

  1. Diana pours all the contents from tube number pi and then pours there exactly xi liters of mercury. 
  2. Let's consider all the ways to add vi liters of water into the tubes; for each way let's count the volume of liquid (water and mercury) in the tube with water with maximum amount of liquid; finally let's find the minimum among counted maximums. That is the number the students want to count. At that, the students don't actually pour the mercury. They perform calculations without changing the contents of the tubes. 



Unfortunately, the calculations proved to be too complex and the students asked you to help them. Help them conduct the described experiment.

Input

The first line contains two integers n and q (1 ≤ n, q ≤ 105) — the number of tubes ans the number of experiment steps. The next line contains n space-separated integers: h1, h2, ..., hn (0 ≤ hi ≤ 109), where hi is the volume of mercury in the і-th tube at the beginning of the experiment.

The next q lines contain the game actions in the following format:

  * A line of form "1 pi xi" means an action of the first type (1 ≤ pi ≤ n; 0 ≤ xi ≤ 109). 
  * A line of form "2 vi" means an action of the second type (1 ≤ vi ≤ 1015). 



It is guaranteed that there is at least one action of the second type. It is guaranteed that all numbers that describe the experiment are integers.

Output

For each action of the second type print the calculated value. The answer will be considered correct if its relative or absolute error doesn't exceed 10 - 4.

Examples

Input

3 3
1 2 0
2 2
1 2 1
2 3


Output

1.50000
1.66667


Input

4 5
1 3 0 1
2 3
2 1
1 3 2
2 3
2 4


Output

1.66667
1.00000
2.33333
2.66667

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long N = 200005;
const double ip = 0.00001;
long long n, q, b[N], len, p[N];
double c[N], d[N], ta;
struct node {
  long long x, z;
  double y;
} a[N];
inline void add(long long w, long long v, long long t) {
  for (; w <= len; w += (w & -w)) c[w] += v, d[w] += t;
}
inline pair<double, double> query(long long w) {
  if (w <= 0) return make_pair(0, 0);
  double re = 0, an = 0;
  for (; w >= 1; w -= (w & -w)) re += c[w], an += d[w];
  return make_pair(re, an);
}
inline bool check(double x) {
  auto tmp =
      query(upper_bound(b + 1, b + len + 1, (long long)(floor(x))) - b - 1);
  return tmp.second * x - tmp.first >= ta;
}
signed main() {
  cin >> n >> q;
  for (long long i = (1), iend = (n); i <= iend; i++)
    cin >> p[i], b[++len] = p[i];
  for (long long i = (1), iend = (q); i <= iend; i++) {
    cin >> a[i].x >> a[i].y;
    if (a[i].x == 1) cin >> a[i].z, b[++len] = a[i].z;
  }
  sort(b + 1, b + len + 1), len = unique(b + 1, b + len + 1) - b - 1;
  for (long long i = (1), iend = (n); i <= iend; i++)
    add(lower_bound(b + 1, b + len + 1, p[i]) - b, p[i], 1);
  for (long long i = (1), iend = (q); i <= iend; i++) {
    if (a[i].x == 1)
      add(lower_bound(b + 1, b + len + 1, p[(long long)(a[i].y)]) - b,
          -p[(long long)(a[i].y)], -1),
          add(lower_bound(b + 1, b + len + 1, p[(long long)(a[i].y)] = a[i].z) -
                  b,
              a[i].z, 1);
    if (a[i].x == 2) {
      ta = a[i].y;
      double l = 0, r = 1e14, ans = r;
      while (r - l > ip) {
        double mid = (r - l) / 2 + l;
        if (check(mid))
          ans = mid, r = mid;
        else
          l = mid;
      }
      printf("%.8lf\n", ans);
    }
  }
  return 0;
}