#abc243b. [abc243_b]Hit and Blow
[abc243_b]Hit and Blow
Problem Statement
You are given integer sequences, each of length : and .
All elements of are different. All elements of are different, too.
Print the following two values.
- The number of integers contained in both and , appearing at the same position in the two sequences. In other words, the number of integers such that .
- The number of integers contained in both and , appearing at different positions in the two sequences. In other words, the number of pairs of integers such that and .
Constraints
- are all different.
- are all different.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answers in two lines: the answer to1.
in the first line, and the answer to2.
in the second line.
Sample Input 1
Sample Output 1
There is one integer contained in both and , appearing at the same position in the two sequences: .
There are two integers contained in both and , appearing at different positions in the two sequences: and .
Sample Input 2
Sample Output 2
In both 1.
and 2.
, no integer satisfies the condition.