$<.each_line.lazy.map(&:split).each_slice(2) do |a, b|
	hit = 0
	blow = 0

	a.each_with_index do |c, i|
		case
		when c == b[i]; hit += 1
		when b.include?(c); blow += 1
		end
	end

	puts [hit, blow] * ' '
end