#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
template <class T>
T RoundOff(T a) {
  return int(a + .5 - (a < 0));
}
template <class T, class C>
void chmax(T& a, C b) {
  if (a < b) a = b;
}
template <class T, class C>
void chmin(T& a, C b) {
  if (b < a) a = b;
}
template <class T, class C>
pair<T, C> mp(T a, C b) {
  return make_pair(a, b);
}
int main() {
  while (true) {
    vector<int> a(4), b(4);
    for (int i = 0; i < 4; i++) cin >> a[i];
    for (int i = 0; i < 4; i++) cin >> b[i];
    int blow = 0, hit = 0;
    for (int i = 0; i < 4; i++) {
      if (a[i] == b[i])
        hit++;
      else
        blow += (0 < count(b.begin(), b.end(), a[i]));
    }
    cout << hit << " " << blow << endl;
  }
}
