#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lli = long long int;
using ld = long double;
const int N = 3e5 + 5, inf = 2e9;
bool isRight(int* c) {
  int sides[3];
  sides[0] = (c[4] - c[2]) * (c[4] - c[2]) + (c[5] - c[3]) * (c[5] - c[3]);
  sides[1] = (c[4] - c[0]) * (c[4] - c[0]) + (c[5] - c[1]) * (c[5] - c[1]);
  sides[2] = (c[2] - c[0]) * (c[2] - c[0]) + (c[3] - c[1]) * (c[3] - c[1]);
  sort(sides, sides + 3);
  if (sides[0] > 0 && sides[2] == sides[0] + sides[1])
    return 1;
  else
    return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int points[6];
  for (int i = 0; i < 6; i++) cin >> points[i];
  if (isRight(points))
    return cout << "RIGHT"
                << "\n",
           0;
  for (int i = 0; i < 6; i++) {
    points[i]++;
    if (isRight(points))
      return cout << "ALMOST"
                  << "\n",
             0;
    points[i] -= 2;
    if (isRight(points))
      return cout << "ALMOST"
                  << "\n",
             0;
    points[i]++;
  }
  cout << "NEITHER"
       << "\n";
  return 0;
}
