read s;
read t;
if [ ${#s} -ne ${#t} ];then
	[ ${#s} -lt ${#t} ]&&echo LESS||echo GREATER;
else
	f="EQUAL";
	for((i=0;i<${#s};i++))do
		if [ ${s:$i:1} != ${t:$i:1} ];then
			if [ ${s:$i:1} \< ${t:$i:1} ];then
				f="LESS";
			else
				f="GREATER";
			fi;
			break;
		fi
	done;
	echo $f
fi;
