import sys

if __name__ == '__main__':
    data = []
    for line in sys.stdin:
        data.append([int(x) for x in line.split(' ')])
        if len(data) == 2:
            choice_a = data[0]
            choice_b = data[1]
            data = []

            #print(choice_a)
            #print(choice_b)

            # hit&blow?????????
            hit = 0
            blow = 0
            for i, d in enumerate(choice_a):
                if d in choice_b:
                    if d == choice_b[i]:
                        hit += 1
                    else:
                        blow += 1

            # ???????????¨???
            print('{0} {1}'.format(hit, blow))