#include <bits/stdc++.h>
int main() {
  int a[4], b[4], g, h, i, n, m, hit, blow;
  hit = 0;
  blow = 0;
  for (g = 0; g < 4; g += 1) {
    scanf("%d", &a[g]);
  };
  for (h = 0; h < 4; h += 1) {
    scanf("%d", &b[h]);
  };
  for (n = 0; n < 4; n += 1) {
    for (m = 0; m < 4; m += 1) {
      if (n == m && a[n] == b[m]) {
        hit += 1;
      } else if (n != m && a[n] == b[m]) {
        blow += 1;
      };
    };
  };
  printf("%d %d\n", hit, blow);
  return 0;
}
