You are given two positive integers n and s. Find the maximum possible median of an array of n non-negative integers (not necessarily distinct), such that the sum of its elements is equal to s.

A median of an array of integers of length m is the number standing on the ⌈ {m/2} ⌉-th (rounding up) position in the non-decreasing ordering of its elements. Positions are numbered starting from 1. For example, a median of the array [20,40,20,50,50,30] is the ⌈ m/2 ⌉-th element of [20,20,30,40,50,50], so it is 30. There exist other definitions of the median, but in this problem we use the described definition.

Input

The input consists of multiple test cases. The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases. Description of the test cases follows.

Each test case contains a single line with two integers n and s (1 ≤ n, s ≤ 10^9) — the length of the array and the required sum of the elements.

Output

For each test case print a single integer — the maximum possible median.

Example

Input


8
1 5
2 5
3 5
2 1
7 17
4 14
1 1000000000
1000000000 1


Output


5
2
2
0
4
4
1000000000
0

Note

Possible arrays for the first three test cases (in each array the median is underlined):

  * In the first test case [\underline{5}] 
  * In the second test case [\underline{2}, 3] 
  * In the third test case [1, \underline{2}, 2] 
import java.util.*;


import java.io.*;

public class Main {
	static final int M = 1000000007;

	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

		String next() {
			while (!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}

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

		long[] readArrayLong(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		int[] readArrayInt(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

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

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

	static class Pair<F, S> {
		F first;
		S second;

		Pair(F first, S second) {
			this.first = first;
			this.second = second;
		}

		public F getFirst() {
			return this.first;
		}

		public S getSecond() {
			return this.second;
		}
		// Sort on basis of first term, reverse p1.first and p2.first to sort in desc
		// Collections.sort(a, (p1, p2) -> (p1.first - p2.first));

		// Sort on the basis of second term, reverse p1.second and p2.second to sort
		// in
		// desc
		// Collections.sort(a, (p1, p2) -> (p1.second - p2.second));
	}

	static long __gcd(long a, long b) {
		if (b == 0)
			return a;
		return __gcd(b, a % b);
	}

	/* Iterative Function to calculate (x^y) in O(log y) */
	static long power(long a, long b) {
		if (b == 0)
			return 1;
		if (b % 2 == 1)
			return (a * power((a * a) % M, b / 2)) % M;
		return power((a * a) % M, b / 2);
	}

	static long[] sum, a;

	public static void main(String[] args) throws IOException {
		FastScanner fs = new FastScanner();
		int T = fs.nextInt();
		// int T = 1;
		StringBuffer res = new StringBuffer();

		for (int tt = 1; tt <= T; tt++) {
			int n = fs.nextInt(), s = fs.nextInt();
			int low = n / 2 + 1;
			res.append(s / low).append("\n");
		}
		System.out.println(res);
	}

	private static boolean is(int[] a, int[] b) {
		for (int i = 0; i < a.length; i++)
			if (a[i] != b[i])
				return false;
		return true;
	}

	private static long getSum(int st, int end, int seg, int l, int r) {
		if (st >= l && r >= end) {
			return sum[seg];
		}
		if (l > st || end > r) {
			return 0;
		}
		int mid = (l + r) / 2;
		return getSum(st, mid, 2 * seg + 1, l, r) + getSum(mid + 1, end, 2 * seg + 2, l, r);
	}

	private static void set(long diff, int l, int r, int ind, int seg) {
		if (ind < l || ind > r)
			return;
		sum[seg] = sum[seg] + diff;
		if (l != r) {
			int mid = (l + r) / 2;
			set(diff, l, mid, ind, 2 * seg + 1);
			set(diff, mid + 1, r, ind, 2 * seg + 2);
		}
	}

	private static long build(int seg, int l, int r) {
		if (l == r) {
			sum[seg] = a[l];
			return a[l];
		}
		int m = (l + r) / 2;
		sum[seg] = build(2 * seg + 1, l, m) + build(2 * seg + 2, m + 1, r);
		return sum[seg];
	}
	
}