/*Q-1---CODEFORCES_#732(DIV-2)
Cirno has prepared two arrays (A) and (B), both consist of (n) non-negative integers. 
She can perform the following operation an arbitrary number of times (possibly zero)-:
-->She chooses two indices (i) and (j) {1≤i,j≤n}, then decreases the i-th element of array (A) by 1, and increases the j-th 
element of array (A) by 1. The resulting values at i-th and j-th index of array A are A[i]−1 and A[j]+1, respectively. 
If (i=j) this operation doesn't change the array(A).

She wants to make some operations to make arrays (A) and (B) equal.
Help Cirno to find sequence of operations that will solve her problem or find, that it is impossible to make arrays (A) and 
(B) equal.

Please note, that you don't have to minimize the number of operations.

INPUT-:
*The first line contains a single integer (t) {1≤t≤100} — the number of test cases.
*The first line of each test case contains single integer (n) {1≤n≤100}.
*The second line of each test case contains (n) integers A1,A2,…,An (0≤Ai≤100).The sum of all Ai does not exceed 100.
*The third line of each test case contains (n) integers B1,B2,…,Bn (0≤Bi≤100).The sum of all Bi does not exceed 100.

OUTPUT-:
For each test case print "-1" on the only line if it is impossible to make two arrays equal with some sequence of
operations.
Otherwise, print an integer (m) in the first line — the number of operations. 
Then print (m) lines, each line consists of two integers (i) and (j) — the indices you choose for the operation.

EXAMPLE-:
t=4

n=4         ---> 2     
A=[1 2 3 4]      2 1
b=[3 1 2 4]      3 1

n=2     ---> -1
A=[1 3]
B=[2 1]

n=1   ---> 0
A=[0]
B=[0]

n=5           ---> 6
A=[4 3 2 1 0]      1 4
B=[0 1 2 3 4]	   1 4
				   1 5
				   1 5
				   2 5
				   2 5

APPRAOCH-: The value to be increased should be equal to value to be decresed.
*/

//EASY QUESTION
#include <bits/stdc++.h>
#define M 1000000007
#define endl '\n'
#define ll long long
using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll t{0};
    cin>>t;
    while(t--){
    	ll n{0};
    	cin>>n;

    	ll a[n+1];
    	for(ll i=1;i<=n;i++)
    		cin>>a[i];

    	ll b[n+1];
    	for(ll i=1;i<=n;i++)
    		cin>>b[i];

    	vector<ll> incre;
    	vector<ll> decre;
    	for(ll i=1;i<=n;i++){
    		if(b[i]>a[i]){
    			ll temp=(b[i]-a[i]);
    			for(ll j=0;j<temp;j++)
    				incre.push_back(i);
    		}
    		else if(b[i]<a[i]){
    			ll temp=(a[i]-b[i]);
    			for(ll j=0;j<temp;j++)
    				decre.push_back(i);
    		}
    	}

    	if(incre.size()==decre.size()){
    		cout<<incre.size()<<endl;
    		for(ll i=0;i<incre.size();i++)
    			cout<<decre[i]<<" "<<incre[i]<<endl;
    	}
    	else{
    		cout<<-1<<endl;
    	}
    }

	return 0;
}