#include <bits/stdc++.h>
#include <iostream>

using namespace std;

const int MAXN = 102;
int a[MAXN], b[MAXN];

void solve()
{
    int n;
    cin >> n;
    int sum = 0;
    
    for (int i = 0; i < n; ++i) cin >> a[i];
    for (int i = 0; i < n; ++i)
    {
        cin >> b[i];
        sum += a[i] - b[i];
    }
    
    if (sum != 0 || sum & 1)
    {
        cout << -1 << '\n';
        return;
    }
    
    vector<pair<int, int>> ans;
    
    for (int i = 0; i < n-1; ++i)
    {
        if (a[i] == b[i])
            continue;
        
        if (a[i] < b[i])
        {
            int j = i+1;
            while (a[i] < b[i])
            {
                if (a[j] > b[j])
                {
                    a[j]--;
                    a[i]++;
                    ans.push_back({j, i});
                }
                else ++j;
            }
        }
        else
        {
            int j = i+1;
            while (a[i] > b[i])
            {
                if (a[j] < b[j])
                {
                    a[j]++;
                    a[i]--;
                    ans.push_back({i, j});
                }
                else ++j;
            }
        }
    }
    
    
    cout << (int)ans.size() << '\n';
    
    for (auto& p: ans)
    {
        cout << p.first + 1 << " " << p.second + 1 << '\n';
    }
    
    
}

int main()
{
    int t = 1;
    cin >> t;
    
    while (t--)
        solve();
        
	return 0;
}