Problem:
Score : 200 points

Problem Statement

You are given two positive integers A and B. Compare the magnitudes of these numbers.

Constraints

1 ≤ A, B ≤ 10^{100}

Neither A nor B begins with a 0.

Input

Input is given from Standard Input in the following format:

A
B

Output

Print GREATER if A>B, LESS if A<B and EQUAL if A=B.

Sample Input 1

36
24

Sample Output 1

GREATER

Since 36>24, print GREATER.

Sample Input 2

850
3777

Sample Output 2

LESS

Sample Input 3

9720246
22516266

Sample Output 3

LESS

Sample Input 4

123456789012345678901234567890
234567890123456789012345678901

Sample Output 4

LESS

Solution in Pascal (FPC 2.6.2) (judge verdict: Accepted)

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils,Classes;
var
  h,w,i,j,count,x,y,sw,m,n:Integer;
  s123,s1,s2,s3,a,b:string;
  tf:Boolean;
  nyu:TStringList;
begin
  try
    { TODO -oUser -cConsole Main : ここにコードを記述してください }
    Readln(a);
    Readln(b);

    if Length(a)>Length(b) then begin
      Writeln('GREATER');
      Readln;
      exit;
    end else if Length(a)<Length(b) then begin
      Writeln('LESS');
      Readln;
      exit;
    end;

    for i := 1 to Length(a) do begin
      if StrToInt(a[i])>StrToInt(b[i]) then begin
        Writeln('GREATER');
        Readln;
        exit;
      end else if StrToInt(a[i])<StrToInt(b[i]) then begin
        Writeln('LESS');
        Readln;
        exit;
      end;
    end;
    Writeln('EQUAL');
    Readln;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.