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