process client{
	
	len=0   
	do{
	   tot=0
	   in("tuples",? len)
	   if(len!=0){
	         A=[] B=[] x=0 y=0
		 len=len-1
	  	 in("data",? A,? B,? x,? y)
	  	 [ tot=tot+(A[r]*B[s])  for r in range(len(A)) for s in range(0:len(B)) if s==r]
	  	 out("result",x,y,tot)
	   }
	   out("tuples",len)	
	}while(len!=0)
}
