#!/usr/local/gnu/bin/bash
read a
read b
if((${#a}!=${#b}))
then
    ((${#a}>${#b})) && echo GREATER || echo LESS
    exit
fi
aa=(`echo $a | fold -1`)
ba=(`echo $b | fold -1`)
for i in `seq 0 $((${#a}-1))`
do
    if((a[i]!=b[i]))
    then
        ((a[i]>b[i])) && echo GREATER || echo LESS
        exit
    fi
done
echo EQUAL