FAREWELL - Quadra vs PussyCat

In their teenage The Quadra and The PussyCatSinghal enters into a healthy competition of solving more and more problem on various programming sites. As of now both of them had grown too old to use their fingers at keyboard, it is time to end this competition. So they ask The CoolAnu to calculate how many of the problems had been solved by both of them, only by The Quadra and only by The PussyCatSinghal.

So your task is to help CoolAnu determine the same. You are given two integers n and m - size of list of problems solved by Quadra and PussyCatSinghal, respectively, along with the list.

Input

The first line of input contains a integer n, number of problems solved by Quadra. Then follows n integers, IDs of problem solved by him. Then next line contain another integer m, number of problems solved by PussyCatSinghal. Then follows m integers, IDs of problem solved by him.

Output

The output contains three lines. Let a be the number of problem solved by both of them, b by only Quadra, c by only PussyCatSinghal. Then the first line contains: "Both: a", second line: "Quadra: b", third line: "PussyCatSinghal: c" (quotes for clarity).

Constraints

  • 0 ≤ n, m ≤105
  • 1 ≤ problem ID ≤ 106
  • all problems solved by a single user have a unique ID.
  • Example

    Input:
    5
    3 2 1 7 9
    6
    5 8 3 9 6 10
    
    Output:
    Both: 2
    Quadra: 3
    PussyCatSinghal: 4

    Explanation

    Both have solved 2 problems with problem IDs 3 and 9.

    Problems solved by Quadra (and not by PussyCatSinghal) are 3 with IDs 1, 2, 7.

    There are 4 problems solved only by PussyCatSinghal, namely 5, 6, 8, 10.


    Added by:abhiranjan
    Date:2012-04-13
    Time limit:1s
    Source limit:50000B
    Memory limit:1536MB
    Cluster: Cube (Intel G860)
    Languages:All except: ASM64

    © Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.