#include <bits/stdc++.h>
using namespace std;
int main() {
  while (1) {
    int hit = 0, blow = 0;
    vector<int> a, b;
    int input;
    for (int i = 0; i < 4; i++) {
      cin >> input;
      a.push_back(input);
    }
    for (int i = 0; i < 4; i++) {
      cin >> input;
      b.push_back(input);
    }
    vector<int>::iterator a_ite, b_ite;
    for (a_ite = a.begin(); a_ite != a.end(); a_ite++) {
      for (b_ite = b.begin(); b_ite != b.end(); b_ite++) {
        if (*a_ite == *b_ite) blow++;
      }
    }
    a_ite = a.begin();
    b_ite = b.begin();
    for (; a_ite != a.end(); a_ite++) {
      if (*a_ite == *b_ite) hit++;
      b_ite++;
    }
    blow -= hit;
    cout << hit << " " << blow << endl;
  }
  return 0;
}
