#include <bits/stdc++.h>
using namespace std;
int x[3], y[3];
int sqr(int x) { return x * x; }
int dis(int x1, int y1, int x2, int y2) {
  return sqr((y1 - y2)) + sqr((x1 - x2));
}
int isRight() {
  for (int i = 0; i < 3; i++)
    if (x[i] == x[(i + 1) % 3] && y[i] == y[(i + 1) % 3]) return 0;
  int d[3];
  for (int i = 0; i < 3; i++)
    d[i] = dis(x[i], y[i], x[(i + 1) % 3], y[(i + 1) % 3]);
  sort(d, d + 3);
  return d[2] == d[0] + d[1];
}
int main() {
  for (int i = 0; i < 3; i++) cin >> x[i] >> y[i];
  bool ok = 0;
  if (isRight()) {
    cout << "RIGHT" << endl;
    return 0;
  }
  for (int dx = -1; dx <= 1; dx++)
    for (int dy = -1; dy <= 1; dy++)
      if (abs(dx) + abs(dy) == 1) {
        for (int i = 0; i < 3; i++) {
          x[i] += dx;
          y[i] += dy;
          ok |= isRight();
          x[i] -= dx;
          y[i] -= dy;
        }
      }
  if (ok)
    cout << "ALMOST" << endl;
  else
    cout << "NEITHER" << endl;
  return 0;
}
