import sys
ans = []
for line in sys.stdin:
    aa = list(map(int,input().split()))
    bb = list(map(int,input().split()))
    hit = 0
    blow = 0
    for one_a in range(len(aa)):
        if aa[one_a] == bb[one_a]:
            hit += 1
        if aa[one_a] in bb:
            blow += 1
    blow = blow - hit
    one_list = [hit,blow]
    ans.append(one_list)

for i in range(len(ans)):
    print(str(ans[i][0]) + ' ' + str(ans[i][1]))
            
        
