import sys 
import numpy as np 

def main():
    input_line = []
#     test_line = ['9 1 8 2', '4 1 5 9', '4 6 8 2', '4 6 3 2']
    
#     for line in test_line:
#         input_line.append(line.split())
    
    
    
    for line in sys.stdin:
        input_line.append(line.split())
    #print(input_line)

    
    for i in range(0,len(input_line),2):
        #hit number
        arrary1 = np.array(input_line[i], dtype=float)
        arrary2 = np.array(input_line[i+1], dtype=float)
        hit_vec = arrary1 - arrary2
        hit_list = list(hit_vec)
        hitnumber = hit_list.count(0.)
        #print(hit_list.count(0.))
        
        #blow number
        
        
        
        
        #get the hit location and remove
        hit_loc = [i for i,x in enumerate(hit_list) if x == 0]
        blow_vec1 = np.delete(arrary1, hit_loc)
        blow_vec2 = np.delete(arrary2, hit_loc)
        blownumber = len(set(blow_vec1).intersection(blow_vec2))
        #print(len(set(blow_vec1).intersection(blow_vec2)))
        
        print(hitnumber,blownumber)


        
if __name__ == '__main__':
    main()