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 JAVA):

Solution:
import java.util.*;
import java.io.*;

import static java.util.Arrays.*;
import static java.lang.Math.*;

public class Main {
	static boolean LOCAL = System.getSecurityManager() == null;
	Scanner in = new Scanner(System.in);
	PrintWriter out = new PrintWriter(System.out);

	void run() {
		while (in.hasNext()) 
			solve();
	}

	private void solve() {
		int n = in.nextInt(), q = in.nextInt();
		int[] is = new int[n];
		for (int i = 0; i < n; i++) is[i] = in.nextInt();
		int[] js = is.clone();
		sort(js);
		T t = NULL;
		for (int i = 0; i < n; i++) t = merge(t, new T(js[i]));
		while (q-- != 0) {
			if (in.nextInt() == 1) {
				int p = in.nextInt() - 1, x = in.nextInt();
				T[] ss = splitKey(t, is[p]);
				T[] ss0 = splitSize(ss[0], ss[0].size - 1);
				t = merge(ss0[0], ss[1]);
				is[p] = x;
				ss = splitKey(t, x);
				t = merge(merge(ss[0], new T(x)), ss[1]);
			} else {
				long v = in.nextLong();
				double l = 0, r = 1e16;
				while (r - l > 1e-5) {
					double m = (l + r) / 2;
					T[] ss = splitKey(t, (long) m);
					if (m * ss[0].size - ss[0].sum >= v) r = m;
					else l = m;
					t = merge(ss[0], ss[1]);
				}
				out.printf("%.5f%n", l);
			}
		}
	}
	
	class T {
		long key, size;
		long sum;
		double p;
		T left, right;

		public T(long key, long size, long sum, double p, T left, T right) {
			this.key = key;
			this.size = size;
			this.sum = sum;
			this.p = p;
			this.left = left;
			this.right = right;
		}

		T(int key) {
			this(key, 1, key, random(), NULL, NULL);
		}
	}

	T change(T t, T left, T right) {
		t.size = left.size + right.size + 1;
		t.sum = left.sum + right.sum + t.key;
		t.left = left;
		t.right = right;
		return t;
	}

	T[] splitSize(T t, long size) {
		T[] res;
		if (size <= 0) {
			res = new T[] { NULL, t };
		} else if (size <= t.left.size) {
			res = splitSize(t.left, size);
			res[1] = change(t, res[1], t.right);
		} else {
			res = splitSize(t.right, size - t.left.size - 1);
			res[0] = change(t, t.left, res[0]);
		}
		return res;
	}

	T[] splitKey(T t, long key) {
		T[] res;
		if (t == NULL) {
			res = new T[] { NULL, NULL };
		} else if (key < t.key) {
			res = splitKey(t.left, key);
			res[1] = change(t, res[1], t.right);
		} else {
			res = splitKey(t.right, key);
			res[0] = change(t, t.left, res[0]);
		}
		return res;
	}

	void print(T t, String indent) {
		if (t != NULL) {
			print(t.right, indent + "      ");
			out.printf("%3d%3d%n", t.key, t.size);
			print(t.left, indent + "      ");
		}
		if (indent.length() == 0)
			out.println("----------------------------------");
	}

	T merge(T t1, T t2) {
		if (t1 == NULL)
			return t2;
		if (t2 == NULL)
			return t1;
		if (t1.p < t2.p)
			return change(t1, t1.left, merge(t1.right, t2));
		return change(t2, merge(t1, t2.left), t2.right);
	}

	T NULL = new T(0, 0, 0, 0, null, null);

	void debug(Object... os) {
		System.err.println(deepToString(os));
	}

	public static void main(String[] args) {
		long start = System.nanoTime();
		if (LOCAL) {
			try {
				System.setIn(new FileInputStream("./../in"));
				// System.setOut(new PrintStream("./../out.txt"));
			} catch (IOException e) {
				LOCAL = false;
			}
		}
		Main main = new Main();
		main.run();
		main.out.close();
		if (LOCAL)
			System.err.printf("[Time %.6fs]%n",
					(System.nanoTime() - start) * 1e-9);
	}
}

class Scanner {
	BufferedReader br;
	StringTokenizer st;

	Scanner(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		eat("");
	}

	private void eat(String string) {
		st = new StringTokenizer(string);
	}

	String nextLine() {
		try {
			return br.readLine();
		} catch (IOException e) {
			return null;
		}
	}

	boolean hasNext() {
		while (!st.hasMoreTokens()) {
			String s = nextLine();
			if (s == null)
				return false;
			eat(s);
		}
		return true;
	}

	String next() {
		hasNext();
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(next());
	}

	long nextLong() {
		return Long.parseLong(next());
	}

	double nextDouble() {
		return Double.parseDouble(next());
	}
}