#include <bits/stdc++.h>
int main() {
  int get_number = 0;
  int a_array[4 + 1];
  int b_array[4 + 1];
  int i = 0;
  int j = 0;
  char carriage_return[4 + 1];
  int hit = 0;
  int blow = 0;
  for (i = 0; i < 4; i++) {
    scanf("%d", &get_number);
    a_array[i] = get_number;
  }
  fgets(carriage_return, (sizeof(carriage_return)), stdin);
  for (j = 0; j < 4; j++) {
    scanf("%d", &get_number);
    b_array[j] = get_number;
  }
  fgets(carriage_return, (sizeof(carriage_return)), stdin);
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      if (a_array[i] == b_array[j]) {
        blow++;
      }
      if (a_array[i] == b_array[j] && i == j) {
        hit++;
      }
    }
  }
  printf("%d %d\n", hit, blow);
  return 0;
}
