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.
# -*- coding: utf-8 -*-

while True:
    try:
        A, B = input().split(), input().split()
        hit = sum([ 1 for i in range(len(A)) if A[i]==B[i] ])
        blow = sum([ 1 for i in range(len(A)) if B[i] in A ])
        print(str(hit) + ' ' +str(blow))
    except:
        break

# -*- coding: utf-8 -*-

while True:
    try:
        A, B = input().split(), input().split()
        hit = sum([ 1 for i in range(len(A)) if A[i]==B[i] ])
        blow = sum([ 1 for i in range(len(A)) if B[i] in A ]) - hit
        print(str(hit) + ' ' +str(blow))
    except:
        break
