import sys

def solve():
    A = []
    B = []
    for i, line in enumerate(sys.stdin):
        t = tuple(map(int, line.split()))
        if i % 2 == 0:
            A.append(t)
        else:
            B.append(t)
    
    for a, b in zip(A, B):
        hit, blow = 0, 0
        
        for i, bb in enumerate(b):
            for j, aa in enumerate(a):
                if bb == aa and i == j:
                    hit += 1
                    break
                elif bb == aa and i != j:
                    blow += 1
                    break
        print(hit, blow)
        

if __name__ == "__main__":
    solve()

