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 int MAXN = 200005;
struct Node {
  int rnd;
  int lch, rch;
  long long val, siz, sum, rep;
  void clear() {
    lch = rch = -1;
    rnd = rand();
    val = siz = sum = rep = 0;
  }
} treap[MAXN];
int tot, root;
void init() {
  root = -1;
  tot = 0;
}
int alloc() {
  tot++;
  treap[tot].clear();
  return tot;
}
void maintain(int k) {
  long long siz = treap[k].rep;
  if (treap[k].lch != -1) siz += treap[treap[k].lch].siz;
  if (treap[k].rch != -1) siz += treap[treap[k].rch].siz;
  treap[k].siz = siz;
  long long sum = treap[k].val * treap[k].rep;
  if (treap[k].lch != -1) sum += treap[treap[k].lch].sum;
  if (treap[k].rch != -1) sum += treap[treap[k].rch].sum;
  treap[k].sum = sum;
}
void rturn(int &k) {
  int t = treap[k].lch;
  treap[k].lch = treap[t].rch;
  treap[t].rch = k;
  maintain(k);
  maintain(t);
  k = t;
}
void lturn(int &k) {
  int t = treap[k].rch;
  treap[k].rch = treap[t].lch;
  treap[t].lch = k;
  maintain(k);
  maintain(t);
  k = t;
}
void insert(int &k, long long x) {
  if (k == -1) {
    k = alloc();
    treap[k].siz = treap[k].rep = 1;
    treap[k].val = treap[k].sum = x;
    return;
  }
  treap[k].siz++;
  treap[k].sum += x;
  if (treap[k].val == x)
    treap[k].rep++;
  else if (x > treap[k].val) {
    insert(treap[k].rch, x);
    if (treap[treap[k].rch].rnd < treap[k].rnd) {
      lturn(k);
    }
  } else {
    insert(treap[k].lch, x);
    if (treap[treap[k].lch].rnd < treap[k].rnd) {
      rturn(k);
    }
  }
}
void remove(int &k, long long x) {
  if (k == -1) return;
  if (treap[k].val == x) {
    if (treap[k].rep > 1) {
      treap[k].rep--;
      treap[k].siz--;
      treap[k].sum -= x;
      return;
    }
    if (treap[k].lch == -1 || treap[k].rch == -1) {
      k = (treap[k].lch == -1) ? treap[k].rch : treap[k].lch;
    } else if (treap[treap[k].lch].rnd < treap[treap[k].rch].rnd) {
      rturn(k);
      remove(k, x);
    } else {
      lturn(k);
      remove(k, x);
    }
  } else if (x > treap[k].val) {
    treap[k].siz--;
    treap[k].sum -= x;
    remove(treap[k].rch, x);
  } else {
    treap[k].siz--;
    treap[k].sum -= x;
    remove(treap[k].lch, x);
  }
}
long long count(int k, long long x) {
  if (k == -1) return 0;
  if (treap[k].val == x) return treap[k].rep;
  if (x > treap[k].val) {
    return count(treap[k].rch, x);
  } else {
    return count(treap[k].lch, x);
  }
}
double query_sum(int k, double x) {
  if (k == -1) return 0;
  double ret = 0;
  if (x < treap[k].val) {
    ret += query_sum(treap[k].lch, x);
    return ret;
  } else {
    if (treap[k].lch != -1) ret += treap[treap[k].lch].sum;
    ret += (double)treap[k].val * treap[k].rep;
    ret += query_sum(treap[k].rch, x);
    return ret;
  }
}
double query_siz(int k, double x) {
  if (k == -1) return 0;
  double ret = 0;
  if (x < treap[k].val) {
    ret += query_siz(treap[k].lch, x);
    return ret;
  } else {
    if (treap[k].lch != -1) ret += treap[treap[k].lch].siz;
    ret += (double)treap[k].rep;
    ret += query_siz(treap[k].rch, x);
    return ret;
  }
}
long long N, Q;
long long seq[MAXN];
bool check(double mid, double arg) {
  double require = query_siz(root, mid) * mid - query_sum(root, mid);
  return arg < require;
}
double solve(double arg) {
  double l = 0, r = 1e17, mid;
  for (int i = 0; i < 100; i++) {
    mid = (l + r) / 2.0;
    if (check(mid, arg)) {
      r = mid;
    } else {
      l = mid;
    }
  }
  return l;
}
int main(int argc, const char *argv[]) {
  srand(time(NULL));
  while (cin >> N >> Q) {
    init();
    for (int i = 1; i <= N; i++) {
      cin >> seq[i];
      insert(root, seq[i]);
    }
    for (int i = 1; i <= Q; i++) {
      long long typ, arg1, arg2;
      cin >> typ >> arg1;
      if (typ == 1) {
        cin >> arg2;
        remove(root, seq[arg1]);
        seq[arg1] = arg2;
        insert(root, arg2);
      } else {
        cout << fixed << setprecision(10) << solve(arg1) << endl;
      }
    }
  }
  return 0;
}