#include <bits/stdc++.h>
int main() {
  while (true) {
    int hit = 0, blow = 0, data[2][4];
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 4; j++) {
        std::cin >> data[i][j];
      }
    }
    for (int i = 0; i < 4; i++) {
      for (int j = 0; j < 4; j++) {
        if (data[0][i] == data[1][j]) {
          if (i == j)
            hit++;
          else
            blow++;
        }
      }
    }
    std::cout << hit << " " << blow << std::endl;
  }
  return 0;
}
