
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9+7;
const int MxN = 1e5+1;
const int MxK = 1e9;
const int inf = INT_MAX;
#define REP0(i,n) for(int i=0; i<n; i++)
#define REP1(i,n) for(int i=1; i<=n; i++)
#define REP(i,a,b) for(int i=a; i<=b; i++)
#define pb push_back
#define fi first
#define se second
#define reset(X) memset(X, 0, sizeof(X))
#define pii pair<int, int>
#define endl "\n"
#define vint vector<int>
#define pll pair<ll, ll>
#define vll vector<ll>
#define LOG 18 //enough for 10^5




void solve()
{
    int n; cin>>n;
    int suma=0;
    int sumb=0;
    int a[n+1];
    int b[n+1];
    REP1(i,n)
    {
        cin>>a[i];
        suma+=a[i];
    }
    REP1(i,n)
    {
        cin>>b[i];
        sumb+=b[i];
    }
    if(suma!=sumb)cout<<-1<<endl;
    else{
        vector<pii> ans;
        
        REP0(i, 100){
        for(int i=1; i<=n; i++)
        {
            bool change=false;

            for(int j=1; j<=n; j++)
            {
                if(a[i]<b[i] && a[j]>b[j])
                {
                    ans.pb({j, i});
                    a[i]++;
                    a[j]--;
                    change=true;
                    break;
                }
            }
            if(change)break;
        }
        }
        
        cout<<ans.size()<<endl;
        REP0(i, ans.size())cout<<ans[i].fi<<" "<<ans[i].se<<endl;
        
        
    }
    
    
    
    
    
}





int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int t; cin>>t;  //t=1;
    while(t--)
    {
        solve();
    }
}

