using System;

namespace id_0025
{
    class Program
    {
        static void Main(string[] args)
        {
            string lineOfFormer,lineOfLator;
            while((lineOfFormer = Console.ReadLine()) != null)
            {
                lineOfLator = Console.ReadLine();
                string[] a = lineOfFormer.Split(' ');
                string[] b = lineOfLator.Split(' ');
                int countOfHit = 0;
                for(int i=0; i < a.Length; i++)
                {
                    if (a[i] == b[i])
                    {
                        countOfHit++;
                    }
                }
                int countOfBlow = 0;
                for(int i= 0;i< a.Length; i++)
                {
                    for(int j= 0; j<b.Length;j++)
                    {
                        if (i != j && a[i] == b[j])
                        {
                            countOfBlow++;
                        }
                    }
                }
                Console.WriteLine(countOfHit+" "+countOfBlow);
            }
        }
    }
}

