program main
  implicit none
  
  integer(16)::a,b
  
  read(*,*)a
  read(*,*)b
  if ((a-b) > 0) then
    write(*,*)"GREATER"
    stop
  else if ((a-b) < 0) then
    write(*,*)"LESS"
    stop
  end if
  write(*,*)"EQUAL"
end program main