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 = 3e5 + 100;
const long long M = 1048576;
const long long mod = 998244353;
const long long MOD = 998244353;
const long double eps = 0.000000001;
const long long P = 1336;
const long long inf = 1e9 + 7;
mt19937 gen(chrono::high_resolution_clock::now().time_since_epoch().count());
unordered_map<long long, long long> mp;
long long a[N], zn[N], f[N], kol[N];
vector<long long> t;
long long pr = 1;
long long uk = 1;
void upd(long long j, long long zn, long long zn2) {
  for (long long i = j; i < uk; i = i | (i + 1)) {
    f[i] += zn;
    kol[i] += zn2;
  }
}
pair<long long, long long> get(long long j) {
  if (j == -1) return {inf, 0};
  long long ans = 0;
  long long k = 0;
  for (long long i = j; i >= 0; i = ((i & (i + 1)) - 1)) {
    ans += f[i];
    k += kol[i];
  }
  return {ans, k};
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  long long n, q;
  cin >> n >> q;
  vector<long long> ve;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    ve.push_back(a[i]);
  }
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < q; i++) {
    long long t;
    cin >> t;
    if (t == 1) {
      long long p, x;
      cin >> p >> x;
      p--;
      v.push_back({p, x});
      ve.push_back(x);
    } else {
      long long x;
      cin >> x;
      v.push_back({x, -1});
    }
  }
  sort(ve.begin(), ve.end());
  mp[ve[0]] = 0;
  zn[0] = ve[0];
  for (long long i = 1; i < ve.size(); i++) {
    if (ve[i] == ve[i - 1]) continue;
    mp[ve[i]] = uk;
    zn[uk] = ve[i];
    uk++;
  }
  for (long long i = 0; i < n; i++) {
    upd(mp[a[i]], a[i], 1);
  }
  for (long long h = 0; h < q; h++) {
    if (v[h].second != -1) {
      long long c = a[v[h].first];
      a[v[h].first] = v[h].second;
      upd(mp[c], -c, -1);
      c = v[h].second;
      upd(mp[c], c, 1);
    } else {
      long long w = v[h].first;
      long double l = 0, r = 1e16, ans = 0;
      pair<long long, long long> s;
      while (l + eps < r) {
        long double mid = (l + r) / 2;
        long long le = 0, ri = uk - 1, ot = -1;
        while (le <= ri) {
          long long x = (le + ri) / 2;
          if (zn[x] > mid)
            ri = x - 1;
          else {
            ot = x;
            le = x + 1;
          }
        }
        s = get(ot);
        if (s.first + w <= mid * s.second) {
          ans = mid;
          r = mid - eps;
        } else
          l = mid + eps;
      }
      cout << fixed << setprecision(10) << ans << '\n';
    }
  }
}