#include <bits/stdc++.h>
int main() {
  int a[4], b[4], g, h, i, n, m, hit, blow;
  hit = 0;
  blow = 0;
  while (scanf("%d %d %d %d %d %d %d %d", &a[0], &a[1], &a[2], &a[3], &b[0],
               &b[1], &b[2], &b[3]) != EOF) {
    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;
}
