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;
template <class T>
inline void si(T &x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c<48 | c> 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
long long bigmod(long long p, long long e, long long M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return ret;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long modinverse(long long a, long long M) { return bigmod(a, M - 2, M); }
void io() { freopen("/Users/MyMac/Desktop/in.txt", "r", stdin); }
const int N = 2e5 + 5;
long long a[N];
struct Node {
  long long t, p, x;
};
vector<Node> o;
long long B1[N], B2[N];
void update(long long x, long long v1, long long v2) {
  while (x < N) {
    B1[x] += v1;
    B2[x] += v2;
    x += x & -x;
  }
}
pair<long long, long long> query(int x) {
  long long r1 = 0, r2 = 0;
  for (; x > 0; x -= x & -x) {
    r1 += B1[x];
    r2 += B2[x];
  }
  return make_pair(r1, r2);
}
vector<long long> in;
bool can(double mid, long long val) {
  long long pos = upper_bound((in).begin(), (in).end(), mid) - in.begin();
  auto q = query(pos);
  double quan = mid * q.first - q.second;
  if (quan >= val) return 1;
  return 0;
}
int main() {
  int n, q;
  si(n);
  si(q);
  for (int i = 0; i < (n); i++) {
    si(a[i]);
    in.push_back((a[i]));
  }
  for (int i = 0; i < (q); i++) {
    int t;
    si(t);
    long long p, x = 0;
    if (t == 1) {
      si(p);
      si(x);
      in.push_back((x));
    } else
      si(p);
    o.push_back({t, p, x});
  }
  sort((in).begin(), (in).end());
  in.resize(unique((in).begin(), (in).end()) - in.begin());
  for (int i = 0; i < (n); i++) {
    long long u = lower_bound(in.begin(), in.end(), a[i]) - in.begin() + 1;
    update(u, 1, a[i]);
  }
  for (auto b : o) {
    if (b.t == 1) {
      int index = b.p;
      index--;
      long long val = b.x;
      long long prvpos =
          lower_bound((in).begin(), (in).end(), a[index]) - in.begin() + 1;
      update(prvpos, -1, -a[index]);
      long long nowpos =
          lower_bound((in).begin(), (in).end(), val) - in.begin() + 1;
      update(nowpos, 1, val);
      a[index] = val;
    } else {
      double lo = 0, hi = 1e15, mid, ans = -1;
      for (int i = 0; i < (100); i++) {
        mid = (lo + hi) / 2;
        if (can(mid, b.p)) {
          ans = mid;
          hi = mid;
        } else
          lo = mid;
      }
      printf("%.9lf\n", ans);
    }
  }
  return 0;
}