#include <bits/stdc++.h>
bool CheckArray(const std::vector<int>& v, const int& x) {
  bool flg = 0;
  for (size_t i = 0; i < v.size(); ++i) {
    if (v[i] == x) {
      flg = 1;
    }
  }
  return flg;
}
int main() {
  const int Item = 4;
  std::vector<int> a;
  int temp = 0, cHit = 0, cBlow = 0;
  while (1) {
    if (std::cin.eof()) {
      break;
    }
    for (int i = 0; i < Item; ++i) {
      std::cin >> temp;
      a.push_back(temp);
    }
    for (int i = 0; i < Item; ++i) {
      std::cin >> temp;
      if (temp == a[i]) {
        ++cHit;
      }
      if (CheckArray(a, temp)) {
        ++cBlow;
      }
    }
    cBlow -= cHit;
    std::cout << cHit << ' ' << cBlow << '\n';
    a.clear();
    cHit = 0, cBlow = 0;
  }
}
