The government of Berland decided to improve network coverage in his country. Berland has a unique structure: the capital in the center and n cities in a circle around the capital. The capital already has a good network coverage (so the government ignores it), but the i-th city contains a_i households that require a connection.

The government designed a plan to build n network stations between all pairs of neighboring cities which will maintain connections only for these cities. In other words, the i-th network station will provide service only for the i-th and the (i + 1)-th city (the n-th station is connected to the n-th and the 1-st city).

All network stations have capacities: the i-th station can provide the connection to at most b_i households.

Now the government asks you to check can the designed stations meet the needs of all cities or not — that is, is it possible to assign each household a network station so that each network station i provides the connection to at most b_i households.

Input

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

The first line of each test case contains the single integer n (2 ≤ n ≤ 10^6) — the number of cities and stations.

The second line of each test case contains n integers (1 ≤ a_i ≤ 10^9) — the number of households in the i-th city.

The third line of each test case contains n integers (1 ≤ b_i ≤ 10^9) — the capacities of the designed stations.

It's guaranteed that the sum of n over test cases doesn't exceed 10^6.

Output

For each test case, print YES, if the designed stations can meet the needs of all cities, or NO otherwise (case insensitive).

Example

Input


5
3
2 3 4
3 3 3
3
3 3 3
2 3 4
4
2 3 4 5
3 7 2 2
4
4 5 2 3
2 3 2 7
2
1 1
10 10


Output


YES
YES
NO
YES
YES

Note

In the first test case: 

  * the first network station can provide 2 connections to the first city and 1 connection to the second city; 
  * the second station can provide 2 connections to the second city and 1 connection to the third city; 
  * the third station can provide 3 connections to the third city. 



In the second test case: 

  * the 1-st station can provide 2 connections to the 1-st city; 
  * the 2-nd station can provide 3 connections to the 2-nd city; 
  * the 3-rd station can provide 3 connections to the 3-rd city and 1 connection to the 1-st station. 



In the third test case, the fourth city needs 5 connections, but the third and the fourth station has 4 connections in total.
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
string to_string(char c) { return "'" + string(1, c) + "'"; }
string to_string(string s) { return '"' + s + '"'; }
string to_string(bool f) {
  if (f)
    return "True";
  else
    return "False";
}
string to_string(const char *s) { return to_string((string)s); }
template <typename A>
string to_string(A);
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ": " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool f = false;
  string r = "{";
  for (auto x : v) {
    if (f) r += ", ";
    r += to_string(x);
    f = true;
  }
  return r += "}";
}
template <typename A>
string to_string(vector<vector<A>> v) {
  string r;
  for (auto x : v) r += "\n" + to_string(x);
  return r;
}
int Nerr;
template <typename A>
string to_string(A *p) {
  return to_string(vector<A>(p, p + Nerr));
}
void err(istream_iterator<string>) { cerr << '\n'; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << to_string(a) << "; ";
  err(++it, args...);
}
template <typename T>
void kek(T ans) {
  cout << ans << '\n';
  exit(0);
}
int table[2000005][22];
int logn[2000005];
int merge(int a, int b) { return max(a, b); }
void perprocess(vector<long long> a) {
  for (int i = 0; i < a.size(); i++) {
    table[i][0] = a[i];
  }
  int k = logn[a.size()];
  for (int j = 1; j <= k; j++) {
    for (int i = 0; i < a.size() - (1 << j) + 1; i++) {
      table[i][j] = merge(table[i][j - 1], table[i + (1 << (j - 1))][j - 1]);
    }
  }
}
int query(int l, int r) {
  int j = logn[r - l + 1];
  return merge(table[l][j], table[r - (1 << j) + 1][j]);
}
signed main() {
  ios_base::sync_with_stdio(0);
  for (int i = 2; i < 2000005; i++) logn[i] = logn[i / 2] + 1;
  int TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    int n;
    cin >> n;
    vector<int> a(2 * n + 1), b(2 * n + 1);
    long long sa = 0, sb = 0;
    for (int i = 1; i < n + 1; i++) {
      cin >> a[i];
      sa += a[i];
      a[n + i] = a[i];
    }
    for (int i = 1; i < n + 1; i++) {
      cin >> b[i];
      sb += b[i];
      b[n + i] = b[i];
    }
    if (sa > sb) {
      cout << "NO" << '\n';
      continue;
    }
    vector<int> c(2 * n + 1);
    for (int i = 1; i < 2 * n + 1; i++) c[i] = a[i] - b[i];
    vector<long long> cum(2 * n + 1);
    cum[0] = 0;
    for (int i = 1; i < 2 * n + 1; i++) cum[i] = cum[i - 1] + c[i];
    for (int i = 1; i < 2 * n + 1; i++) cum[i] = min(cum[i], (int)2e9 * 1ll);
    for (int i = 1; i < 2 * n + 1; i++) cum[i] = max(cum[i], -(int)2e9 * 1ll);
    perprocess(cum);
    bool f = 1;
    for (int i = 1; i < n + 1; i++) {
      int r = query(i + 1, i + n);
      r = r - cum[i];
      if (b[i] < r) {
        f = 0;
        break;
      }
    }
    if (f)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
}
