#include <bits/stdc++.h>
using namespace std;
int main() {
  int p, a, b, c, j, n;
  vector<int> v;
  for (int i = 0; i < 6; i++) {
    cin >> p;
    v.push_back(p);
  }
  a = (v[0] - v[2]) * (v[0] - v[2]) + (v[1] - v[3]) * (v[1] - v[3]);
  b = (v[2] - v[4]) * (v[2] - v[4]) + (v[3] - v[5]) * (v[3] - v[5]);
  c = (v[4] - v[0]) * (v[4] - v[0]) + (v[5] - v[1]) * (v[5] - v[1]);
  if (a + b == c || a + c == b || b + c == a) {
    cout << "RIGHT";
  } else if (a + b != c || a + c != b || b + c != a) {
    for (j = 0; j < 6; j++) {
      n = v[j];
      v[j] = n + 1;
      a = (v[0] - v[2]) * (v[0] - v[2]) + (v[1] - v[3]) * (v[1] - v[3]);
      b = (v[2] - v[4]) * (v[2] - v[4]) + (v[3] - v[5]) * (v[3] - v[5]);
      c = (v[4] - v[0]) * (v[4] - v[0]) + (v[5] - v[1]) * (v[5] - v[1]);
      if ((a + b == c || a + c == b || b + c == a) &&
          (a != 0 && b != 0 && c != 0)) {
        cout << "ALMOST";
        return 0;
      }
      v[j] = n - 1;
      a = (v[0] - v[2]) * (v[0] - v[2]) + (v[1] - v[3]) * (v[1] - v[3]);
      b = (v[2] - v[4]) * (v[2] - v[4]) + (v[3] - v[5]) * (v[3] - v[5]);
      c = (v[4] - v[0]) * (v[4] - v[0]) + (v[5] - v[1]) * (v[5] - v[1]);
      if ((a + b == c || a + c == b || b + c == a) &&
          (a != 0 && b != 0 && c != 0)) {
        cout << "ALMOST";
        return 0;
      }
      v[j] = n;
    }
    cout << "NEITHER";
  }
}
