import sys
lists=[]
for st in sys.stdin:
    lists+=[tuple(st.split(' '))]

for x in range(0,len(lists),2):
    hit=0
    for e in range(4):
        if lists[x][e]==lists[x+1][e]:
            hit+=1
    blow=0
    for y in lists[x]:
        if y in lists[x+1]:
            blow+=1
    blow = blow-hit
    print hit,blow