import std.stdio, std.conv, std.algorithm, std.range, std.array, std.string, std.uni, std.bigint;                                                                                                                                                                                            void main() {                                                                                    auto A = BigInt(readln.chomp);                                                                 auto B = BigInt(readln.chomp);                                                                 if (A > B) {                                                                                     writeln("GREATER");                                                                          } else if (A < B) {                                                                              writeln("LESS");                                                                             } else {                                                                                         writeln("EQUAL");                                                                            }                                                                                            }       