Two political parties are contesting in the elections in the N number of states in the country. Each party wins some seats every year in each state. After the current elections are over we have the result of both the parties with their number of seats won in each state.

The two parties are considered equal if they win the same number of seats in the N states in any order. Otherwise, they are considered unequal. Input/Output Specifications

INPUT: 1) It is an array of N integers depicting number of seats won by party one in each state. 2) It is an array of N integers depicting number of seats won by party two in each state. 3) An integer containing number of states (N).

OUTPUT: Equal/Unequal/Invalid

Equal: if political parties are equal Unequal: if political parties are unequal Invalid: if any party has invalid number of seats in any state

Examples

Example 1:

Two parties contested in seven states Seats won by party one in all the seven states: {12,11,5,2,7,5,-11} Seats won by party two in all the seven states: {5,12,5,7,11,2,11} The party two has an invalid number of winning seats(-11). So the output will be "Invalid".

Input :

1) {12,11,5,2,7,5,-11}

2) {5,12,5,7,11,2,11}

3) 7

Output: Invalid

Example 2:

Two parties contested in seven states Seats won by party one in all the seven states: {12,11,5,2,7,5,11} Seats won by party two in all the seven states: {5,12,5,7,11,2,11} Both the parties are equal because they have got 11(2 times each), 5(2 times each),7( 1 time each), 2(1 time each), 12( 1 time each other outputs (0 times each).

Input :

1) {12,11,5,2,7,5,11}

2) {5,12,5,7,11,2,11}

3) 7

Output: Equal

Example 3:

Input :

{12,11,5,2,7,5,11}

{5,0,5,7,11,2,11}

7

Output: Unequal

Use code snippet button to post the code!