Square or Prime Digit?

Time limit: 1s Memory limit: 64MB Input: Output:

Task

You are given an integer xx with nn digits. While trying to think at various problems for the Runtime Terror Competition, the scientific committee stumbled upon some basic math definitions:

A number xx is a perfect square if there is an integer yy such that y2=xy^2 = x. A number yy is a prime number if its only divisors are 11 and yy.

Similarly, a square digit is a digit which is perfect square and a prime digit is a digit which is a prime number.

Now your goal is to find out whether the given number has more square digits or more prime digits. If there is an equality, print Equal.

Input data

On the first line you are given nn, the length of the integer. On the next line you are given the integer, represented as a string of length nn. The integer is represented with digits from 00 to 99 and has no leading zeroes.

Output data

You will print Square if it has more square digits than prime digits, Prime if it has more prime digits than square digits or Equal, if we have equality.

Constraints and clarifications

  • 1n1001 \leq n \leq 100;
# Score Constraints
0 0 Example
1 30 1n91 \leq n \leq 9
2 30 1n191 \leq n \leq 19
3 40 No additional constraints

Example

stdin

6
402497

stdout

Square

Explanation

The given number, 402497402497 has 44 square digits (44, 00, 44 and 99) and 22 prime digits (22 and 77).

Log in or sign up to be able to send submissions!