unittest
{
	assert( [ "36", "24" ].parse.expand.solve == "GREATER" );
	assert( [ "850", "3777" ].parse.expand.solve == "LESS" );
	assert( [ "9720246", "22516266" ].parse.expand.solve == "LESS" );
	assert( [ "123456789012345678901234567890", "234567890123456789012345678901" ].parse.expand.solve == "LESS" );

	assert( [ "123", "123" ].parse.expand.solve == "EQUAL" );		// 追加ケース
}



import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto a = input.front.strip;
	input.popFront;
	auto b = input.front.strip;
	return tuple( a, b );
}

auto solve( string a, string b )
{
	if( a.length < b.length ) return "LESS";
	if( b.length < a.length ) return "GREATER";
	if( a < b ) return "LESS";
	if( b < a ) return "GREATER";
	return "EQUAL";
}
