#include<iostream> #include<algorithm> #include<string.h> using namespace std; int data[50],target[50]; int number_data[15],number_target[15]; int main(){ int n,i,a,b; int count = 0; while(scanf("%d",&n)!=EOF&&n){ memset(number_data,0,sizeof(number_data)); for(i=0;i<n;i++){ scanf("%d",&data[i]); number_data[data[i]]++; } printf("Game %d:\n",++count); while(true){ bool flag = true; for(i=0;i<n;i++){ scanf("%d",&target[i]); if(target[i]!=0)flag = false; } if(flag)break; memset(number_target,0,sizeof(number_target)); a = 0; b = 0; for(i=0;i<n;i++){ if(data[i]==target[i]){ a++; } number_target[target[i]]++; } for(i=0;i<=9;i++){ b += min(number_data[i],number_target[i]); } b -= a; printf("(%d,%d)\n",a,b); } } return 0; }