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