program main
  implicit none
  
  double precision ::a,b
  
  read(*,*)a
  read(*,*)b
  if ((a - b) > 0.5) then
    write(*,'(A)')"GREATER"
    stop
  else if ((a - b) < -0.5) then
    write(*,'(A)')"LESS"
    stop
  end if
  write(*,'(A)')"EQUAL"
end program main
