let () = Scanf.scanf "%s\n%s" @@ fun a b ->
  if String.length a < String.length b then print_endline "LESS"
  else if String.length a > String.length b then print_endline "GREATER"
  else
    try
      Array.init (String.length a) (fun i -> Char.code b.[i] - Char.code a.[i])
      |> Array.to_list
      |> List.find (( <> ) 0)
      |> (fun d -> if 0 < d then "LESS" else "GREATER")
      |> print_endline
    with Not_found -> print_endline "EQUAL"
