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


class Template
{
	static Scanner sc;

	public static void Main(string[] args)
	{
		sc = new Scanner();
		while (true)
		{
			int[] a = sc.nextIntArray();
			int[] b = sc.nextIntArray();
			if (a == null && b == null) break;
			int blow = 0, hit = 0;
			for (int i = 0; i < a.Length; i++)
			{
				if (a[i] == b[i]) hit++;
				if (a[i] < b[i]) blow++;
			}
			Console.WriteLine(hit + " " + blow);
		}
	}
}

public class Scanner
{
	public Scanner() { }
	public string next()
	{
		return Console.ReadLine();
	}
	public int nextInt()
	{
		return int.Parse(next());
	}
	public double nextDouble()
	{
		return double.Parse(next());
	}
	public long nextLong()
	{
		return long.Parse(next());
	}
	public string[] nextArray()
	{
		return next().Split(' ');
	}
	public int[] nextIntArray()
	{
		return Array.ConvertAll(nextArray(), e => int.Parse(e));
	}
	public long[] nextLongArray()
	{
		return Array.ConvertAll(nextArray(), e => long.Parse(e));
	}
	public double[] nextDoubleArray()
	{
		return Array.ConvertAll(nextArray(), e => double.Parse(e));
	}
}