#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
bool isright(int a[]) {
  int dis[3];
  dis[0] = (a[0] - a[2]) * (a[0] - a[2]) + (a[1] - a[3]) * (a[1] - a[3]);
  dis[1] = (a[2] - a[4]) * (a[2] - a[4]) + (a[3] - a[5]) * (a[3] - a[5]);
  dis[2] = (a[0] - a[4]) * (a[0] - a[4]) + (a[1] - a[5]) * (a[1] - a[5]);
  sort(dis, dis + 3);
  if (dis[0] > 0 && dis[2] == dis[0] + dis[1])
    return true;
  else
    return false;
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  int a[6];
  for (int i = 0; i < 6; i++) cin >> a[i];
  if (isright(a)) {
    cout << "RIGHT";
    return 0;
  } else {
    for (int i = 0; i < 6; i++) {
      a[i]++;
      if (isright(a)) {
        cout << "ALMOST";
        return 0;
      }
      a[i] -= 2;
      if (isright(a)) {
        cout << "ALMOST";
        return 0;
      }
      a[i]++;
    }
  }
  cout << "NEITHER";
  return 0;
}
