#define _CRT_SECURE_NO_WARNINGS
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#include <bits/stdc++.h>
using namespace std;
const int N = 105;
long long a[N], b[N];
int main()
{
    int T, n;
    scanf("%d", &T);
    while (T--)
    {
        scanf("%d", &n);
        for (int i = n - 1; i >= 0; i--) scanf("%lld", a + i);
        for (int i = n - 1; i >= 0; i--) scanf("%lld", b + i);
        for (int i = 1; i < n; i++) a[i] += a[i - 1], b[i] += b[i - 1];
        bool flag = true;
        for (int i = 0; i < n; i++)
            if (a[i] > b[i])
                flag = false;
        puts(flag ? "Yes" : "No");
    }
    return 0;
}
