using System;
using System.Collections.Generic;
					
public class my
{
	public static void Main()
	{
		string s;
		
		while( null != ( s = Console.ReadLine()) ) {
			var a = my.GetIntArray(s);
			var b = my.GetIntArray();
			
			Console.WriteLine("{0} {1}", my.Hit(a, b), my.Blow(a, b));
		}
	}
	
	private static int Hit(int[] a, int[] b)
	{
		var cnt = 0;
		
		for(int i = 0; i < a.Length; i++) {
			if(a[i] == b[i])	cnt++;
		}
		
		return cnt;
	}
	
	private static int Blow(int[] a, int[] b)
	{
		var cnt = 0;
		
		for(int i = 0; i < a.Length; i++) {
			for(int j =0; j < b.Length; j++) {
				if(i == j) continue;
				
				if(a[i] == b[j])	cnt++;
			}
		}
		
		return cnt;
	}
	
	private static int GetInt()
	{
		return int.Parse(Console.ReadLine());
	}
	
	private static int[] GetIntArray()
	{
		return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
	}

	private static int[] GetIntArray(int n)
	{
		var A = new int[n];
		var s = Console.ReadLine().Split(' ');

		for(int i = 0; i < n; i++) {
			A[i] = int.Parse(s[i]);
		}
		return A;
	}

	private static int[] GetIntArray(char c)
	{
		return Array.ConvertAll(Console.ReadLine().Split(c), int.Parse);
	}
	
	private static int[] GetIntArray(string s)
	{
		return Array.ConvertAll(s.Split(' '), int.Parse);
	}
	
	private static double[] GetDoubleArray()
	{
		return Array.ConvertAll(Console.ReadLine().Split(' '), double.Parse);
	}
	
	public static string Reverse(string s)
	{
		var c = s.ToCharArray();
		Array.Reverse(c);
		
		return new String(c);
	}
	
	private static void WriteArray(int[] a)
	{
		Console.WriteLine(string.Join(" ", Array.ConvertAll( a, x=>x.ToString() ) ) );
	}

	private static void WriteArray(long[] a)
	{
		Console.WriteLine(string.Join(" ", Array.ConvertAll( a, x=>x.ToString() ) ) );
	}
	
	private static void WriteVector(Vector v)
	{
		Console.WriteLine(string.Format("{0:f8} {1:f8}", v.X, v.Y));
	}
}

public struct Vector
{
	public double X,Y;
}