#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define fr(a,b) for(int i = a; i < b; i++)
#define rep(i,a,b) for(int i = a; i < b; i++)
#define mod 1000000007
#define inf (1LL<<60)
#define all(x) (x).begin(), (x).end()
#define prDouble(x) cout << fixed << setprecision(10) << x
#define triplet pair<ll,pair<ll,ll>>
#define goog(tno) cout << "Case #" << tno <<": "
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL)
#define read(x) int x; cin >> x
using namespace std;

void init_code() {
	fast_io;
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
int getpos(int a[], int b[], int n)
{
	fr(0, n)
	{
		if (a[i] - b[i] > 0)
		{
			a[i]--;
			return i + 1;

		}
	}
	return -1;
}
int getneg(int a[], int b[], int n)
{
	fr(0, n)
	{
		if (a[i] - b[i] < 0)
		{
			a[i]++;
			return i + 1;

		}
	}
	return -1;
}

void solve(int a[], int b[], int n)
{
	int sum = 0;
	int psum = 0;
	fr(0, n)
	{
		sum += a[i] - b[i];
		if (a[i] - b[i] > 0)
			psum += a[i] - b[i];
	}

	if (sum != 0)
	{
		cout << "-1" << endl;
		return;
	}
	else
	{
		cout << psum << endl;
		if (psum == 0)
			return;
		else
		{
			while (psum--)
				cout << getpos(a, b, n) << " " << getneg(a, b, n) << endl;
		}
	}

}

int main() {
	init_code();
	int t = 1; cin >> t;
	while (t--) {
		read(n);
		int a[n], b[n];
		fr(0, n)
		cin >> a[i];
		fr(0, n)
		cin >> b[i];
		solve(a, b, n);
	}
	return 0;
}