while(1):
	try:
		a = [int(i) for i in input().split()]
		b = [int(i) for i in input().split()]
		hit = 0
		for i,j in zip(a,b):
			if i == j:
				hit += 1
		sa = set(a)
		sb = set(b)
		u = sa & sb
		blow = len(u) - hit
		print(hit, blow)
	except EOFError:
		break
