import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);
	private static final int CARD_NUM = 4; //?????????????????°

	public static void main(String[] args) {
		int[][] numbers = new int[2][CARD_NUM]; //??????????????????

		while(sc.hasNext()) {
			int hit = 0; //???????????°
			int blow = 0; //???????????°

			//?????£???????????????????????\?????????
			for(int $ = 0; $ < 2; $++) { //?????¬????????°??¶?????°?????????
				for(int i = 0; i < CARD_NUM; i++) { //?????????????????°??¶?????°?????????
					numbers[$][i] = sc.nextInt();
				}
			}

			//??????????????°?????°??????
			for(int $ = 0; $ < CARD_NUM; $++) {
				if(numbers[0][$] == numbers[1][$]) {
					hit++;
				} else {
					for(int i = 0; i < CARD_NUM; i++) {
						if(numbers[0][$] == numbers[1][i]) {
							blow++;
						}
					}
				}
			}

			System.out.println(hit + " " + blow);
		}
	}
}