#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
bool Rigth(int x1, int y1, int x2, int y2, int x3, int y3) {
  int m = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
  int n = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);
  int p = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3);
  if (m == 0 || n == 0 || p == 0) return false;
  return m == n + p || n == m + p || p == m + n;
}
bool Move(int x1, int y1, int x2, int y2, int x3, int y3) {
  bool r = false;
  for (int i = 0; i < 4; ++i) {
    r = r || Rigth(x1 + dx[i], y1 + dy[i], x2, y2, x3, y3);
    r = r || Rigth(x1, y1, x2 + dx[i], y2 + dy[i], x3, y3);
    r = r || Rigth(x1, y1, x2, y2, x3 + dx[i], y3 + dy[i]);
  }
  return r;
}
int main() {
  int x1, y1, x2, y2, x3, y3;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  if (Rigth(x1, y1, x2, y2, x3, y3))
    cout << "RIGHT";
  else if (Move(x1, y1, x2, y2, x3, y3))
    cout << "ALMOST";
  else
    cout << "NEITHER";
}
