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 <typename T>
T next_int() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') {
    p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch - '0');
    ch = getchar();
  }
  return p * x;
}
string next_token() {
  char ch;
  string ans = "";
  do {
    ch = getchar();
  } while (ch <= ' ');
  while (ch > ' ') {
    ans += ch;
    ch = getchar();
  }
  return ans;
}
const long long INF = (long long)1e18;
const int INFINT = (int)1e9 + 227 + 1;
const int MAXN = (int)2e5 + 227 + 1;
const int MOD = (int)1e9 + 7;
const long double EPS = 1e-7;
long long bin_pow(long long a, long long b) {
  if (!b) return 1;
  long long ans = bin_pow(a, b / 2);
  ans = ans * ans;
  if (b % 2) ans = ans * a;
  return ans;
}
struct bor {
  struct node {
    node() {
      link[0] = link[1] = -1;
      sum = k = 0;
    }
    long long sum;
    int link[2];
    int k;
  };
  bor() { t.push_back(node()); }
  vector<node> t;
  void add(int a) {
    int v = 0;
    for (int i = 29; i >= 0; i--) {
      bool to = (1 << i) & a;
      t[v].sum += a;
      t[v].k++;
      if (t[v].link[to] == -1) {
        t[v].link[to] = t.size();
        t.push_back(node());
      }
      v = t[v].link[to];
    }
    t[v].k++;
    t[v].sum += a;
  }
  void del(int a) {
    int v = 0;
    for (int i = 29; i >= 0; i--) {
      bool to = (1 << i) & a;
      t[v].sum -= a;
      t[v].k--;
      v = t[v].link[to];
    }
    t[v].k--;
    t[v].sum -= a;
  }
  pair<int, long long> get(long long a) {
    if (a > (long long)1e9) return make_pair(t[0].k, t[0].sum);
    int v = 0;
    pair<int, long long> ans = make_pair(0, 0);
    for (int i = 29; i >= 0; i--) {
      bool to = (1 << i) & a;
      if (to == 1) {
        if (t[v].link[0] != -1) {
          ans.second += t[t[v].link[0]].sum;
          ans.first += t[t[v].link[0]].k;
        }
      }
      if (t[v].link[to] == -1) {
        t[v].link[to] = t.size();
        t.push_back(node());
      }
      v = t[v].link[to];
    }
    ans.second += t[v].sum;
    ans.first += t[v].k;
    return ans;
  }
};
bor t;
long double f(long double i) {
  pair<long double, long double> temp = t.get((long long)(i + EPS));
  return temp.first * i - temp.second;
}
int a[MAXN];
int main() {
  int n = next_int<int>();
  int m = next_int<int>();
  for (int i = 0; i < n; i++) {
    a[i] = next_int<int>();
    t.add(a[i]);
  }
  bool ok = (n == 1 && m == 100000);
  ok = 0;
  int number = 0;
  while (m--) {
    int type = next_int<int>();
    number++;
    if (type == 1) {
      int p = next_int<int>() - 1;
      int x = next_int<int>();
      t.del(a[p]);
      a[p] = x;
      t.add(a[p]);
    } else {
      long long c = next_int<long long>();
      long double l = 0;
      long double r = 1e15 + 1e5;
      for (int it = 0; it < 80; it++) {
        long double C = (l + r) / 2;
        if (f(C) < c) {
          l = C;
        } else {
          r = C;
        }
      }
      if (!ok)
        cout << setprecision(20) << fixed << l << "\n";
      else
        cout << fixed << a[0] + c << "\n";
    }
  }
}