#include <bits/stdc++.h>
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
int main() {
  vector<int> a(4);
  vector<int> b(4);
  int hit_count = 0;
  int blow_count = 0;
  for (int i = 0; i < (int)(4); ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < (int)(4); ++i) {
    cin >> b[i];
  }
  for (int i = 0; i < (int)(4); ++i) {
    if (a[i] == b[i]) {
      hit_count++;
    }
  }
  for (int i = 0; i < (int)(4); ++i) {
    for (int j = 0; j < (int)(4); ++j) {
      if (i == j) continue;
      if (a[i] == b[j]) {
        blow_count++;
      }
    }
  }
  cout << hit_count << " " << blow_count << endl;
}
