#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int dir_r[] = {1, 0, -1, 0, -1, 1, -1, 1};
int dir_c[] = {0, 1, 0, -1, -1, 1, 1, -1};
int xr[] = {1, -1, 0, 0};
int yc[] = {0, 0, 1, -1};
struct point {
  int x, y;
};
int distSq(point p, point q) {
  return (p.x - q.x) * (p.x - q.x) + (p.y - q.y) * (p.y - q.y);
}
bool is_right(point p1, point p2, point p3) {
  int a, b, c;
  a = distSq(p1, p2);
  b = distSq(p2, p3);
  c = distSq(p1, p3);
  if (!a || !c || !b) return false;
  if (a == b + c || b == a + c || c == a + b) return true;
  return false;
}
int main(void) {
  point p1, p2, p3, p4;
  cin >> p1.x >> p1.y >> p2.x >> p2.y >> p3.x >> p3.y;
  if (is_right(p1, p2, p3)) {
    cout << "RIGHT";
    return 0;
  }
  for (int i = 0; i < 4; i++) {
    p4.x = p1.x + xr[i];
    p4.y = p1.y + yc[i];
    if (is_right(p4, p2, p3)) {
      cout << "ALMOST";
      return 0;
    }
  }
  for (int i = 0; i < 4; i++) {
    p4.x = p2.x + xr[i];
    p4.y = p2.y + yc[i];
    if (is_right(p1, p4, p3)) {
      cout << "ALMOST";
      return 0;
    }
  }
  for (int i = 0; i < 4; i++) {
    p4.x = p3.x + xr[i];
    p4.y = p3.y + yc[i];
    if (is_right(p1, p2, p4)) {
      cout << "ALMOST";
      return 0;
    }
  }
  cout << "NEITHER";
  return 0;
}
