#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
bool comp(ld a, ld b) { return (a < b); }
bool check(ll a, ll b, ll c, ll d, ll e, ll f) {
  if ((c == a && d == b) || (e == c && f == d) || (f == b && e == a))
    return false;
  ll dis1, dis2, dis3;
  dis1 = (d - b) * (d - b) + (c - a) * (c - a);
  dis2 = (f - d) * (f - d) + (e - c) * (e - c);
  dis3 = (e - a) * (e - a) + (f - b) * (f - b);
  ll max_ = max({dis1, dis2, dis3}, comp);
  if (max_ == dis1) {
    if (dis1 == dis2 + dis3) return true;
  } else if (max_ == dis2) {
    if (dis2 == dis1 + dis3) return true;
  } else {
    if (dis3 == dis2 + dis1) return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  ll arr[6];
  for (ll i = 0; i < 6; i++) cin >> arr[i];
  if (check(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]))
    cout << "RIGHT" << '\n';
  else {
    ll count = 0;
    for (ll i = 0; i < 6; i++) {
      arr[i]++;
      if (check(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5])) {
        cout << "ALMOST" << '\n';
        break;
      } else
        arr[i]--;
      count++;
    }
    if (count == 6) {
      count = 0;
      for (ll i = 0; i < 6; i++) {
        arr[i]--;
        if (check(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5])) {
          cout << "ALMOST" << '\n';
          break;
        } else
          arr[i]++;
        count++;
      }
    }
    if (count == 6) cout << "NEITHER" << '\n';
  }
  return 0;
}
