#include <bits/stdc++.h>
int main() {
  int a[4], b[4];
  int eat = 0, bite = 0;
  for (int i = 0; i < 4; i++) {
    std::cin >> a[i];
  }
  for (int i = 0; i < 4; i++) {
    std::cin >> b[i];
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      if (i == j && a[i] == b[j]) {
        eat++;
      } else if (a[i] == b[j]) {
        bite++;
      }
    }
  }
  std::cout << eat << " " << bite << std::endl;
  return 0;
}
