"use strict";
const Main = (input) =>{
	let xs = input.trim().split('\n');    
    let A = xs[0].trim().split(' ').map(v=>parseInt(v,10));
    //console.log(A);
    let B = xs[1].trim().split(' ').map(v=>parseInt(v,10));
    //console.log(B);
    if(A[0] > B[0]){
      console.log('GREATER');
    }else if(B[0] > A[0]){
      console.log('LESS');
    }else{
      console.log('EQUAL');
    }
  }
Main(require('fs').readFileSync('/dev/stdin','utf8'));