import sys
array = []
for i in sys.stdin.readlines():
    array.append(i.rstrip().split())
for i in range(0,len(array),2):
    hit = 0
    blow = 0
    for i2 in range(4):
        if array[i][i2] == array[i+1][i2]:
            hit += 1
        for i3 in range(4):
            if array[i][i2] == array[i+1][i3]:
                if i2 == i3:
                    continue
                blow += 1
    print(str(hit)+" "+str(blow))