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>
#pragma GCC optimize("-O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx2")
using namespace std;
const long long MOD = 1e9 + 7;
mt19937_64 rnd(time(0));
long long n, m, k, d, h, TT, T, P, SZ, mx = 0, ans, kl, a[1000001];
vector<long long> v;
bool tt[1000001];
long long binpow(long long h, long long r, long long md = MOD) {
  long long l = 1;
  while (r) {
    if (r & 1) l *= h, l %= md;
    h *= h;
    h %= md;
    r /= 2;
  }
  return l;
}
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  while (x && y) {
    x %= y;
    swap(x, y);
  }
  return x + y;
}
struct node {
  node *l, *r;
  long long x, y, kl, sum, mx;
  node(long long x, long long y)
      : x(x), y(y), kl(1), sum(x), mx(x), l(nullptr), r(nullptr){};
};
struct DD {
  node* root;
  pair<pair<long long, long long>, long long> get(node* h) {
    return (h != nullptr ? make_pair(make_pair(h->sum, h->kl), h->mx)
                         : make_pair(make_pair(0ll, 0ll), 0ll));
  }
  void upd(node* h) {
    pair<pair<long long, long long>, long long> o1 = get(h->l), o2 = get(h->r);
    h->sum = h->x + o1.first.first + o2.first.first;
    h->kl = 1 + o1.first.second + o2.first.second;
    h->mx = max(h->x, max(o1.second, o2.second));
  }
  node* merg(node* L, node* R) {
    if (L == nullptr) return R;
    if (R == nullptr) return L;
    if (L->y > R->y) {
      L->r = merg(L->r, R);
      upd(L);
      return L;
    } else {
      R->l = merg(L, R->l);
      upd(R);
      return R;
    }
  }
  pair<node*, node*> split(node* h, long long x) {
    if (h == nullptr) return make_pair(nullptr, nullptr);
    if (h->x > x) {
      pair<node*, node*> q = split(h->l, x);
      h->l = q.second;
      upd(h);
      return make_pair(q.first, h);
    } else {
      pair<node*, node*> q = split(h->r, x);
      h->r = q.first;
      upd(h);
      return make_pair(h, q.second);
    }
  }
  void insrt(long long x) {
    long long o = rnd() % MOD;
    node* q = new node(x, o);
    auto w = split(root, x);
    root = merg(w.first, merg(q, w.second));
    upd(root);
  }
  void erase(long long x) {
    auto q = split(root, x);
    auto w = split(q.first, x - 1);
    w.second = merg(w.second->l, w.second->r);
    q.first = merg(w.first, w.second);
    root = merg(q.first, q.second);
  }
  pair<pair<long long, long long>, long long> get_sum(long long x) {
    auto q = split(root, x);
    pair<pair<long long, long long>, long long> p = get(q.first);
    root = merg(q.first, q.second);
    return p;
  }
};
DD g;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    g.insrt(a[i]);
  }
  cout.precision(5);
  for (int i = 0; i < m; i++) {
    long long t;
    cin >> t;
    if (t == 1) {
      long long x, y;
      cin >> x >> y;
      g.erase(a[x]);
      a[x] = y;
      g.insrt(a[x]);
    } else {
      long long x;
      cin >> x;
      long long l = 0, r = 1e9;
      while (l < r) {
        long long w = (l + r + 1) / 2;
        auto p = g.get_sum(w);
        if ((long double)(p.first.first + x) / (long double)p.first.second <
            p.second)
          r = w - 1;
        else
          l = w;
      }
      auto p = g.get_sum(l);
      cout << fixed
           << (long double)(p.first.first + x) / (long double)p.first.second
           << "\n";
    }
  }
  return 0;
}