#!/usr/bin/env python
# coding: utf-8


def hit_and_blow(a, b):
    hits = 0
    blows = 0
    for i in xrange(4):
        if b[i] == a[i]:
            hits += 1
        else:
            for j in xrange(4):
                if j == i:
                    continue
                if b[i] == a[j]:
                    blows += 1
    return hits, blows


def main():
    while 1:
        try:
            a = [int(x) for x in raw_input().split(" ")]
            b = [int(x) for x in raw_input().split(" ")]
        except EOFError:
            pass
        print "%d %d" % hit_and_blow(a, b)

if __name__ == '__main__':
    main()