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>
using namespace std;
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long int power(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b % 2 == 0) return (power((a * a) % 998244353, b / 2)) % 998244353;
  return (a * (power((a * a) % 998244353, b / 2)) % 998244353) % 998244353;
}
long long int modInv(long long int n) { return power(n, 1000000007 - 2); }
long long int nCr(long long int n, long long int r,
                  long long int p = 1000000007) {
  if (r == 0) return 1;
  long long int Fact[n + 1];
  Fact[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    Fact[i] = (Fact[i - 1] * i) % p;
  }
  return (((Fact[n] * modInv(Fact[r])) % 1000000007) *
          (modInv(Fact[n - r]) % 1000000007)) %
         1000000007;
}
double PI = 3.14159265359;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i;
    cin >> n;
    long long int A[n], B[n];
    for (i = 0; i < n; i++) cin >> A[i];
    for (i = 0; i < n; i++) cin >> B[i];
    long long int low = 0, high = min(B[n - 1], A[0]);
    while (low <= high) {
      long long int TempA[n], TempB[n];
      for (i = 0; i < n; i++) {
        TempA[i] = A[i];
        TempB[i] = B[i];
      }
      long long int mid = (low + high) / 2;
      TempA[0] -= mid;
      TempB[n - 1] -= mid;
      TempB[0] -= TempA[0];
      if (TempB[0] < 0) {
        low = mid + 1;
        continue;
      }
      bool extra = false;
      for (i = 1; i < n; i++) {
        TempA[i] -= TempB[i - 1];
        if (TempA[i] < 0) extra = true;
        TempA[i] = max((long long int)0, TempA[i]);
        if (TempB[i] >= TempA[i]) {
          TempB[i] -= TempA[i];
        } else {
          break;
        }
      }
      if (i == n) {
        cout << "YES" << endl;
        goto last;
      }
      if (extra == false) {
        low = mid + 1;
      } else {
        high = mid - 1;
      }
    }
    cout << "NO" << endl;
  last:;
  }
}
