提示: 欢迎访问OurACM平台。
Problem 1376 Random Numbers

Accept: 153    Submit: 535
Time Limit: 1000 mSec    Memory Limit : 32768 KB

Problem Description

Random numbers are used for computer games but they are also used on a more serious scale for the generation of cryptographic keys and for some classes of scientific experiments. For scientific experiments, it is convenient that a series of random numbers can be replayed for use in several experiments, and pseudo-random numbers are well suited for this purpose. For cryptographic use, however, it is important that the numbers used to generate keys are not just seemingly random; they must be truly unpredictable.

Now you are testing the efficiency of the new encrypt algorithm, so you need a series of real random numbers. In order to do this, your boss has given you two sets of random numbers generated by his powerful generators. However, after a few hours of experiment, you realized that the two sets you received might be the same one...

You are to write a program to verify your conjecture.

Input

There are several test cases in the input. There are two lines for each test case, representing the set of numbers in two sets: A and B. Each line contains a series of numbers. The first number of the line is n (1<=n<=10^5), representing the number of elements in the set. The following are n numbers, indicating elements in the set. All elements are guaranteed to be within 32bit integers.

Process to the end of file.

Output

For each test case, output one line indicating your conclusion. That is one of following "A equals to B","A is a proper set of B","B is a proper set of A","A and B are distinct". If the two sets is not of the above conditions, output "-_-".

Sample Input

3 1 2 3 4 4 5 6 7 4 1 2 3 4 3 1 2 3 4 1 2 3 4 4 4 5 6 7

Sample Output

A and B are distinct B is a proper set of A -_-

Source

FZU 2005

Submit  Back  Status  Discuss