Problem: Monocarp would like to open a bakery in his local area. But, at first, he should figure out whether he can compete with other shops.

Monocarp plans that the bakery will work for n days. On the i-th day, a_i loaves of bread will be baked in the morning before the opening. At the end of the n-th day, Monocarp will sell all the remaining bread that wasn't sold earlier with a huge discount.

Because of how bread is stored, the bakery seller sells the bread in the following order: firstly, he sells the loaves that were baked that morning; secondly, he sells the loaves that were baked the day before and weren't sold yet; then the loaves that were baked two days before and weren't sold yet, and so on. That's why some customers may buy a rather stale bread and will definitely spread negative rumors.

Let's define loaf spoilage as the difference between the day it was baked and the day it was sold. Then the unattractiveness of the bakery will be equal to the maximum spoilage among all loaves of bread baked at the bakery.

Suppose Monocarp's local area has consumer demand equal to k, it means that each day k customers will come to the bakery and each of them will ask for one loaf of bread (the loaves are sold according to the aforementioned order). If there is no bread left, then the person just doesn't buy anything. During the last day sale, all the remaining loaves will be sold (and they will still count in the calculation of the unattractiveness).

Monocarp analyzed his competitors' data and came up with m possible consumer demand values k_1, k_2, ..., k_m, and now he'd like to calculate the unattractiveness of the bakery for each value of demand. Can you help him?

Input

The first line contains two integers n and m (1 ≤ n ≤ 2 ⋅ 10^5; 1 ≤ m ≤ 2 ⋅ 10^5) — the number of days the bakery is open and the number of possible values of consumer demand.

The second line contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 10^9) — the number of bread loaves that will be baked each day.

The third line contains m integers k_1, k_2, ..., k_m (1 ≤ k_1 < k_2 < ... < k_m ≤ 10^9) — the possible consumer demand values in the ascending order.

Output

Print m integers: for each consumer demand, print the unattractiveness of the bakery.

Examples

Input


5 4
5 2 1 3 7
1 3 4 10


Output


4 2 1 0 


Input


8 9
3 1 4 1 5 9 2 6
1 2 3 4 5 6 7 8 9


Output


7 5 3 3 2 1 1 1 0 

Note

In the first example, let's describe what happens for couple consumer demands:

If consumer demand is equal to 1: 

  * at day 1: 5 loaves are baked and only 1 is sold with spoilage equal to 1 - 1 = 0; 
  * at day 2: 4 loaves are left and 2 more are baked. Only 1 loaf was sold and it was the loaf baked today with spoilage 2 - 2 = 0; 
  * at day 3: 4 loaves from the first day and 1 loaf from the second day left. One more loaf was baked and was sold this day with spoilage 3 - 3 = 0; 
  * at day 4: 4 loaves from the first day and 1 loaf from the second day left. 3 more loaves were baked and one of them was sold this day with spoilage 4 - 4 = 0; 
  * at day 5: 4 loaves from the first day, 1 loaf from the second day and 2 loaves from the fourth day left. 7 more loaves were baked and, since it's the last day, all 14 loaves were sold. 4 loaves from the first day have the maximum spoilage equal to 5 - 1 = 4. 

In total, the unattractiveness of the bakery will be equal to 4.

If consumer demand is equal to 10 then all baked bread will be sold in the day it was baked and will have spoilage equal to 0.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>

#define FASTIO
#define ff first
#define ss second
#define pb push_back
#define input(c, n) for (int i = 0; i < n; ++i) cin >> c[i];
#define exit_message(s) return 0 * printf(s)
#define show_all(c) for (auto i: c) cout << i << " "; cout << "\n";
#define display(c, a, n) cout << "Displaying array \"" << #c << "\" : \n"; for (int (i) = (a); (i) < (n); ++(i)) cout << (c)[(i)] << " "; cout << "\n";
#define forl(i, a, n) for (int i = (a); (i) < (n); ++(i))
#define dugbe(k) cerr << "-\t> " << #k << " = " << k << "\n";
#define dugbev(arr, idx) cerr << "-\t " << #arr << "[" << idx << "] : " << arr[idx] << "\n";
#define debug(args...) { string _debug_list = #args; replace(_debug_list.begin(), _debug_list.end(), ',', ' '); stringstream _debug_stream(_debug_list); istream_iterator<string> __it(_debug_stream); debug_func(__it, args); }

/*
// What follows is a magical ordered set data structure.
// Supports the following functions:
// find_by_order(int k) - returns k'th smallest element (0-indexed)
// order_of_key(int k) - returns number of elements strictly smaller than k.
using namespace __gnu_pbds;
#define ordered_set tree <ll, null_type, greater_equal <ll>, rb_tree_tag, tree_order_statistics_node_update>
*/

/* TIPS FOR DEBUGGING
 * Check if values are not overflowing (use long long where required)
 * Check if ranges are inclusive or not.
 * Check properly if greedy will work or not before using it.
 * Check EDGE CASES!! Seriously, even in 2B, saving 8 points by being
 * 2 minutes faster will bite you in the ass if you don't make sure
 * it works on edge cases.
 * Keep adding to this list.
*/

using namespace std;
typedef long long ll;
typedef pair<int, int> pr;
typedef pair<ll, ll> prll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pr> vpr;
ifstream in("input.txt");
const ll mod = 1e9 + 7;
const long double eps = 1e-7;

void debug_func(istream_iterator<string> _it) {
	cerr << "\n";
}

template <typename T, typename... Args>
void debug_func(istream_iterator<string> _it, T x, Args... args) {
	cerr << "[ " << *_it << " : " << x << " ]";
	cerr << " , ";
	debug_func(++_it, args...);
}

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

long long true_rand(long long n) {
	// Returns a random number between 0 and n - 1 inclusive using mt19937.
	uniform_int_distribution<long long> uid(0, n - 1);
	return uid(rng);
}

ll mod_pow(ll a, ll b) {
	if (b == 0)
		return 1LL;

	ll res = mod_pow(a, b >> 1);
	res = (res * res) % mod;
	if (b & 1LL)
		res = (res * a) % mod;
	
	return res;
}

ll inverse(ll a) {
	return mod_pow(a, mod - 2);
}

const int N = 2e5 + 5;
const ll INF = 1e9 + 5, LLINF = 1e18 + 5;

int n, m;
vi a, k;
vi rep, nex, res;
vll sum;

int32_t main() {
	#ifdef FASTIO
		ios_base::sync_with_stdio(false);
		cin.tie(NULL);
	#endif
	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	cin >> n >> m;
	map<int, vi> mp;
	set<int> demands {0};
	a.resize(n);
	rep.resize(n);
	sum.resize(n);
	nex.resize(n);

	forl(i, 0, n) {
		cin >> a[i];
		mp[a[i]].pb(i);
		rep[i] = i;
		sum[i] = a[i];
		nex[i] = i + 1;
		demands.insert(a[i]);
	}
	k.resize(m);
	forl(i, 0, m) {
		cin >> k[i];
	}

	int last_demand = INF;
	int idx = m - 1;
	res.assign(m, 0);
	int ans = 0;

	while (true) {
		auto pos = demands.lower_bound(last_demand);
		if (pos == demands.begin())  {
			break;
		}
		--pos;
		int demand = *pos;
		for (; idx >= 0; --idx) {
			if (k[idx] < demand) {
				break;
			}
			res[idx] = ans;
		}

		// debug(demand, idx, ans);
		for (int day: mp[demand]) {
			int new_limit = -1;
			bool flag = false;
			do {
				int lef = rep[day];
				// debug(lef, day);
				if (lef != day) {
					flag = true;
					break;
				}
				if (nex[day] >= n) {
					flag = true;
					break;
				}
				int rig = rep[nex[day]];
				assert (rig == nex[day]);

				sum[lef] += sum[rig];
				rep[rig] = lef;
				int num_elem = (nex[rig] - lef);
				assert (num_elem != 0);
				ans = max(ans, num_elem - 1);
				new_limit = (sum[lef] + num_elem - 1) / num_elem;
				// debug(new_limit);
				nex[lef] = nex[rig];
			} while (new_limit == demand);
			if (new_limit == -1 || flag) {
				continue;
			}
			mp[new_limit].pb(day);
			demands.insert(new_limit);
		}
		last_demand = demand;
	}
	forl(i, 0, m) {
		cout << res[i] << " ";
	}
	cout << "\n";

	return 0;
}