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;
map<int, int> M;
struct node {
  int ile;
  long long suma;
};
vector<node> T;
int l, size;
void Stworz(int n) {
  int p = 1;
  while (p < n) p *= 2;
  l = p;
  size = 2 * p - 1;
  for (int i = 0; i <= size; ++i) T.push_back({0, 0});
}
void Ustaw(int a, int x, int h) {
  a += l;
  T[a] = {T[a].ile + x, T[a].suma + x * h};
  a /= 2;
  while (a != 0) {
    T[a] = {T[2 * a].ile + T[2 * a + 1].ile, T[2 * a].suma + T[2 * a + 1].suma};
    a /= 2;
  }
}
node Ile(int a, int b) {
  a += l;
  b += l;
  node wyn = T[a];
  if (b != a) wyn = {wyn.ile + T[b].ile, wyn.suma + T[b].suma};
  while (a / 2 != b / 2) {
    if (a % 2 == 0) wyn = {wyn.ile + T[a + 1].ile, wyn.suma + T[a + 1].suma};
    if (b % 2 == 1) wyn = {wyn.ile + T[b - 1].ile, wyn.suma + T[b - 1].suma};
    a /= 2;
    b /= 2;
  }
  return wyn;
}
void Skaluj(vector<int>& a) {
  sort(a.begin(), a.end());
  int nr = 0;
  for (int i = 0; i < a.size(); ++i) {
    if (i == 0 || a[i] != a[i - 1]) {
      M[a[i]] = nr;
      ++nr;
    }
  }
}
double Ile_wody(double h, vector<int>& wart) {
  if (h <= (double)wart[0]) return 0.0;
  int l = 0, p = wart.size() - 1, s, r = -1;
  while (l <= p) {
    s = (l + p) / 2;
    if ((double)wart[s] >= h) {
      r = s;
      p = s - 1;
    } else
      l = s + 1;
  }
  if (r == -1)
    r = wart.size() - 1;
  else
    --r;
  node x = Ile(0, M[wart[r]]);
  return h * x.ile - x.suma;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, q;
  cin >> n >> q;
  vector<int> a(n);
  vector<int> wart;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    wart.push_back(a[i]);
  }
  vector<vector<long long> > zap(q);
  for (int i = 0; i < q; ++i) {
    int op;
    cin >> op;
    zap[i].push_back(op);
    if (op == 1) {
      int p, x;
      cin >> p >> x;
      --p;
      zap[i].push_back(p);
      zap[i].push_back(x);
      wart.push_back(x);
    } else {
      long long v;
      cin >> v;
      zap[i].push_back(v);
    }
  }
  Skaluj(wart);
  Stworz(M.size());
  for (int i = 0; i < n; ++i) Ustaw(M[a[i]], 1, a[i]);
  cout << fixed << setprecision(10);
  for (int i = 0; i < q; ++i) {
    if (zap[i][0] == 1) {
      Ustaw(M[a[zap[i][1]]], -1, a[zap[i][1]]);
      Ustaw(M[zap[i][2]], 1, zap[i][2]);
      a[zap[i][1]] = zap[i][2];
    } else {
      double l = 0.0, p = 10000000000000000.0, s;
      for (int j = 0; j < 70; ++j) {
        s = (l + p) / 2.0;
        if (Ile_wody(s, wart) <= (double)zap[i][1])
          l = s;
        else
          p = s;
      }
      cout << s << endl;
    }
  }
  return 0;
}