#include<bits/stdc++.h>
using namespace std;
const int N = 200;
int a[N],b[N],c[N],f1[N],f2[N];
int main() {
	int _,i,j,n,m;
	cin >> _;
	while(_--) {
		int res = 0,flag = 0;
		cin >> n;
		for(i=1;i<=n;i++)cin >> a[i];
		for(i=1;i<=n;i++)cin >> b[i];
		for(i=1;i<=n;i++)c[i] = a[i]-b[i];
		for(i=1;i<=n;i++) {
			int x = c[i];
			while(x<0) {
				res++;
				f1[res] = i;
				for(j=1;j<=n;j++) {
					if(c[j]>0){
						c[j]--;
						f2[res] = j;
						c[i]++;
						break;
					} 
				}
				x++;
				
			}
		}
		for(i=1;i<=n;i++)
			if(c[i]){
				flag = 1;
				break;
			}
		if(flag)cout << -1 << endl;
		else {
			cout << res << endl;
			for(i=1;i<=res;i++) {
				cout << f2[i] << ' ' << f1[i] << endl;
			}
		}
	}
	return 0;
}