#include <iostream>
#include <vector>
using namespace std;

int main(int argc, char const *argv[])
{
	int t;
	cin>>t;
	while(t--){
		int n;
		cin>>n;
		int a[n];
		int b[n];
		for (int i = 0; i < n; ++i)
		{
			cin>>a[i];
		}
		for (int i = 0; i < n; ++i)
		{
			cin>>b[i];
		}
		vector<int> pst,ngt;
		int sumdiff=0,diff;
		for (int i = 0; i < n; ++i)
		{
			diff=b[i]-a[i];
			sumdiff+=diff;
			if(diff>0) {
				while(diff--) pst.push_back(i+1);
			}
			else if(diff<0) {
				diff=-1*diff;
				while(diff--) ngt.push_back(i+1);
			}
		}

		if(sumdiff!=0 ) {cout<<-1<<endl; continue;}
		int m=pst.size();
		cout<<m<<endl;
		for(int i=0;i<m;i++){
			cout<<ngt[i]<<" "<<pst[i]<<endl;
		}
		

	}
	return 0;
}