output_description: Print `GREATER` if A>B, `LESS` if A<B and `EQUAL` if A=B.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A
      B
attempt: #include <bits/stdc++.h>
  #define rep(i, n) for (int i=0; i<n; ++i)
  #define rep1(i, n) for (int i=1; i<=n; ++i)
  #define ALL(v) v.begin(), v.end()
  #define RALL(v) v.rbegin(), v.rend()
  #define EPS (1e-7)
  #define INF (1e9)
  #define PI (acos(-1))
  using namespace std;
  typedef long long ll;
  typedef pair<ll, ll> P;
  constexpr ll  MOD = (1e9+7);
  constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
  constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }
  
  template<class T> inline bool chmin(T& a, T b) {
      if (a > b) {
          a = b;
          return true;
      }
      return false;
  }
  template<class T> inline bool chmax(T& a, T b) {
      if (a < b) {
          a = b;
          return true;
      }
      return false;
  }
  ll factorial(ll n, ll m=2) {
      // calculate n!
      m = max(2LL, m);
      ll rtn = 1;
      for (ll i=m; i<=n; i++) {
          rtn = (rtn * i) % MOD;
      }
      return rtn;
  }
  ll modinv(ll a, ll m) {
      ll b = m, u = 1, v = 0;
      while (b) {
          ll t = a / b;
          a -= t * b;
          swap(a, b);
          u -= t * v;
          swap(u, v);
      }
      u %= m;
      if (u < 0) u += m;
      return u;
  }
  ll modpow(ll a, ll n) {
      ll res = 1;
      while (n > 0) {
          if (n & 1)
              res = res * a % MOD;
          a = a * a % MOD;
          n >>= 1;
      }
      return res;
  }
  
  int main() {
      cin.tie(0);
      ios::sync_with_stdio(0);
      string a, b; cin >> a >> b;
      if (a.size() > b.size()) {
          cout << "GREATER" << endl;
      } else if (a.size() < b.size()) {
          cout << "LESS" << endl;
      } else {
          rep(i, a.size()) {
              if (a[i] > b[i]) {puts("GREATER"); return 0;}
              else if (a[i] < b[i]) {puts("LESS"); return 0;}
          }
          puts("EQUAL");
      }
      return 0;
  }
problem_description: Statement
  
  You are given two positive integers A and B. Compare the magnitudes of these
  numbers.
samples: [{"input": "36\n    24", "output": "GREATER\n    \n\nSince 36>24, print `GREATER`.\n\n* * *"}, {"input": "850\n    3777", "output": "LESS\n    \n\n* * *"}, {"input": "9720246\n    22516266", "output": "LESS\n    \n\n* * *"}, {"input": "123456789012345678901234567890\n    234567890123456789012345678901", "output": "LESS"}]