#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	int a, b, c, d, e, f, g, h;

	while ( cin >> a >> b >> c >> d >> e >> f >> h >> h )
	{
		vector<int> pa;
		pa.push_back( a );
		pa.push_back( b );
		pa.push_back( c );
		pa.push_back( d );
		
		vector<int> pb;
		pb.push_back( e );
		pb.push_back( f );
		pb.push_back( g );
		pb.push_back( h );

		int hit, blow;
		hit = blow = 0;

		for ( unsigned int i = 0; i < 4; i++ )
		{
			for ( unsigned int j = 0; j < 4; j++ )
			{
				if ( pa[i] == pb[j] )
				{
					if ( i == j )
					{
						hit++;
					}
					else
					{
						blow++;
					}
				}
			}
		}

		cout << hit << ' ' << blow << endl;
	}

	return 0;
}