#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(a) a.begin(),a.end()
typedef pair<ll,ll> pi;

//__builtin_popcountll(2) (the number of ones in the binary representation)
//__builtin_clz(2) (number of leading zeroes)
//__builtin_ctz(2) (number of trailing zeroes)

/*#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define ordered_multiset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
#define ordered_multiset2 tree< pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag, tree_order_statistics_node_update>
*/
// s.find_by_order(k)(returns iterator to kth element), s.order_of_key(k)(number of elements less than number)

ll mod = 1e9+7;
vector<ll> fact(1);
/*vector<ll> spf(10000005), cntPrime(10000005);

void spff(){
    int i;
    for(i=1;i<10000005;i++) spf[i] = i;
    for(i=2;i*i<10000005;i++)
    {
        if(spf[i] != i) continue;
        for(int j = i*i; j < 10000005; j+= i){
            if(spf[j]==j) spf[j] = i;
        }
    }
    for(i=1;i<10000005;i++){
        if(spf[i] != spf[i/spf[i]]){
            cntPrime[i] = cntPrime[i/spf[i]]+1;
        }
        else cntPrime[i] = cntPrime[i/spf[i]];
    }
}
while(spf[a[i]]!=a[i]){
              z=spf[a[i]];
              while(a[i]%z==0) a[i]/=z;
              m[z]++;
          }
          if(a[i]>1) m[a[i]]++;*/
 
ll gcd(ll a, ll b) 
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);       
}
 
ll power(ll x, ll y) 
{ 
    ll temp; 
    if( y == 0) 
        return 1; 
    temp = power(x, y/2); 
    if (y%2 == 0) 
        return temp*temp; 
    else
        return x*temp*temp; 
}
 
ll power(ll x, ll y, ll p) 
{ 
    ll res = 1; 
    x = x % p; 
  
    while (y > 0) { 
        if (y & 1) res = (res * x) % p; 
        y = y >> 1;
        x = (x * x) % p; 
    } 
    return res; 
} 
  
ll modInv(ll n, ll p) 
{ 
    return power(n, p - 2, p); 
} 
 
ll ncr(ll n, ll r) {return (n>=r?(fact[n]*modInv(fact[r],mod))%mod*modInv(fact[n-r],mod)%mod:0);}

ll add(ll a, ll b) {ll z=a+b; if(z>=mod) z -= mod; return z;}
ll mul(ll a, ll b) { return (a*b)%mod;}
ll sub(ll a, ll b) { return (a-b+mod)%mod;}
// LLONG_MAX
// priority_queue<int, vector<int>, greater<int> > q; // min heap
// for unordered_map: m.reserve(1024); m.max_load_factor(0.25);

int main()
{  
  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
  ll t=1,n,i,j,ca=0,x,y,c;
  cin>>t;
  //fact[0]=1;
  //for(i=1;i<300003;i++)fact[i]=(fact[i-1]*i)%mod;
  while(t--)
  {
      cin>>n;
      vector<ll> a(n), b(n);
      ll sum=0, sum2=0;
      for(i=0;i<n;i++) {
          cin>>a[i];
          sum+=a[i];
      }
      for(j=0;j<n;j++){ 
          cin>>b[j];
          sum2+=b[j];
      }
      //cout<<"w";

      if(sum!=sum2){cout<<"-1\n"; continue;}

      vector<pi> ans;
      for(i=0;i<n;i++){
          while(a[i]!=b[i]){
              if(a[i]>b[i]){
                for(j=i+1;j<n;j++){
                  if(a[j]<b[j]){
                      a[j]++; a[i]--;
                      ans.pb({i,j}); break;
                  }
                }
              }
              else{
                for(j=i+1;j<n;j++){
                  if(a[j]>b[j]){
                      a[j]--; a[i]++;
                      ans.pb({j,i}); break;
                  }
                }
              }
          }
      }

      cout<<ans.size()<<'\n';
      for(i=0;i<ans.size();i++){
          cout<<ans[i].fi+1<<' '<<ans[i].se+1<<'\n';
      }
  }
}
