#include <bits/stdc++.h>
int main(void) {
  int a[4] = {0};
  int b[4] = {0};
  int i, j, k;
  int counthit = 0;
  int countblow = 0;
  i = 0;
  while (scanf("%d", &a[i]) != EOF) {
    for (j = 1; j < 4; j++) {
      scanf("%d", &a[j]);
    }
    for (j = 0; j < 4; j++) {
      scanf("%d", &b[j]);
    }
    for (j = 0; j < 4; j++) {
      if (a[j] == b[j]) {
        counthit++;
      }
    }
    printf("%d ", counthit);
    counthit = 0;
    for (j = 0; j < 4; j++) {
      for (k = 0; k < 4; k++) {
        if (a[j] == b[k]) {
          countblow++;
        }
      }
    }
    printf("%d\n", countblow);
    countblow = 0;
  }
  return 0;
}
