Let's play Hit and Blow game. _A_ imagines four numbers and _B_ guesses the numbers. After _B_ picks out four numbers, _A_ answers:    * The number of numbers which have the same place with numbers _A_ imagined (Hit)    * The number of numbers included (but different place) in the numbers _A_ imagined (Blow)  For example, if _A_ imagined numbers:                 9 1 8 2   and _B_ chose:                 4 1 5 9   _A_ should say 1 Hit and 1 Blow.  Write a program which reads four numbers _A_ imagined and four numbers _B_ chose and prints the number of Hit and Blow respectively. You may assume that the four numbers are all different and within from 0 to 9.
while True:
    try:
        a=[int(i) for i in input().split()]
        b=[int(i) for i in input().split()]
    except:
        break
    hit,blow=0,0
    for i,j in zip(a,b):
        if j in a:
            blow+=1
        if i==j:
            hit+=1
while True:
    try:
        a=[int(i) for i in input().split()]
        b=[int(i) for i in input().split()]
    except:
        break
    hit,blow=0,0
    for i,j in zip(a,b):
        if i==j:
            hit+=1
        elif j in a:
            blow+=1
    print(hit,blow)