
#include <bits/stdc++.h>
using namespace std;
#define int long long 

void solve() {

    int n ;
    cin >> n ;
    vector<int> a(n) , b(n) ;
    for(auto &it : a ) cin>>it;
    for(auto &it : b ) cin>>it;   
        vector<int> positive , negative ;

    int sum = 0 ; 

        for(int i = 0 ; i < n ; i++ ) {
              sum+=a[i]-b[i];
              int difference = a[i] - b[i] ;
              if(difference==0 ) continue ;
              else if (difference > 0 ) {
                while(difference--){
                    positive.push_back(i+1) ;
                }
              }
              else{
                difference = 0 - difference ;
                while(difference--){
                    negative.push_back(i+1) ;
                }
              }
        }
    if(sum != 0 ) cout<<"-1"<<'\n';
    else  {
        cout<<positive.size()<<endl ;
        for(int i = 0 ; i < positive.size() ; i++ ) {
            cout<<positive[i]<<' '<<negative[i]<<endl;
        }
    }
}

int32_t main () {
    int T ; cin >> T ; 
    while ( T-- ) solve() ;
}