open Buffer
let a, b = Scanf.scanf " %s %s" @@ fun a b -> a, b
let n, m = String.length a, String.length b
let ma = max n m
let a', b' = create ma, create ma
let _ =
  List.iter (fun (b, s, l) -> add_string b @@ String.make (ma - l) '0'; add_string b s) [a', a, n; b', b, m];
  print_endline @@ if a' > b' then "GREATER" else if a' < b' then "LESS" else "EQUAL"