using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AthleteProgramming2
{

    class Program
    {
        static void Main(string[] args)
        {
            string str1;
            string str2;
            while ((str1 = Console.ReadLine()) != null)
            {
                str2 = Console.ReadLine();

                int[] aArray = str1.Split(' ').Select(int.Parse).ToArray();
                int[] bArray = str2.Split(' ').Select(int.Parse).ToArray();

                int hit = 0;
                int blow = 0;

                //hit????????????
                for(int i = 0; i < aArray.Length; i++)
                {
                    if (aArray[i] == bArray[i])
                    {
                        hit++;
                    }
                    for(int j = 0; j < aArray.Length; j++)
                    {
                        if (aArray[i] == bArray[j]&&j!=i)
                        {
                            blow++;
                        }
                    }
                }

                Console.Write("{0} {1}",hit,blow);

            }
        }

    }

}