#include <bits/stdc++.h>
using namespace std;
int x[3], y[3];
int f(int a) { return a * a; }
bool right() {
  int a, b, c;
  a = f(x[0] - x[1]) + f(y[0] - y[1]);
  b = f(x[1] - x[2]) + f(y[1] - y[2]);
  c = f(x[2] - x[0]) + f(y[2] - y[0]);
  if (a == 0 || b == 0 || c == 0) return false;
  if (a + b == c || a + c == b || b + c == a)
    return true;
  else
    return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < 3; i++) cin >> x[i] >> y[i];
  if (right()) {
    cout << "RIGHT" << endl;
    return 0;
  } else {
    int cc = 0;
    for (int i = 0; i < 3; i++) {
      for (int j = -1; j < 2; j++) {
        x[i] += j;
        if (right()) cc = 1;
        x[i] -= j;
        y[i] += j;
        if (right()) cc = 1;
        y[i] -= j;
      }
    }
    if (cc == 1) {
      cout << "ALMOST" << endl;
      return 0;
    }
  }
  cout << "NEITHER" << endl;
  return 0;
}
