#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
int sqr(int r) { return r * r; }
int check(int a[]) {
  int s1 = sqr(a[0] - a[2]) + sqr(a[1] - a[3]);
  int s2 = sqr(a[0] - a[4]) + sqr(a[1] - a[5]);
  int s3 = sqr(a[4] - a[2]) + sqr(a[5] - a[3]);
  if (s1 < s2) swap(s1, s2);
  if (s1 < s3) swap(s1, s3);
  if (fabs(sqrt((double)s1) - sqrt((double)s2) - sqrt((double)s3)) < 1e-5)
    return 0;
  return s1 == s2 + s3;
}
int main() {
  int pts[6];
  for (int i = 0; i < 6; i++) scanf("%d", &pts[i]);
  if (check(pts))
    printf("RIGHT");
  else {
    int solved = 0;
    for (int i = 0; i < 6; i++) {
      pts[i]--;
      if (check(pts)) {
        printf("ALMOST");
        solved = 1;
        break;
      }
      pts[i] += 2;
      if (check(pts)) {
        printf("ALMOST");
        solved = 1;
        break;
      }
      pts[i]--;
    }
    if (!solved) printf("NEITHER");
  }
  return 0;
}
