#include <bits/stdc++.h>
int x[3], y[3];
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int dis(int a, int b) {
  return (x[a] - x[b]) * (x[a] - x[b]) + (y[a] - y[b]) * (y[a] - y[b]);
}
bool check() {
  int a = dis(0, 1);
  int b = dis(1, 2);
  int c = dis(0, 2);
  if (a == 0 || b == 0 || c == 0) return 0;
  if (a + b == c || a + c == b || b + c == a) return 1;
  return 0;
}
int main() {
  for (int i = 0; i < 3; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  if (check()) {
    puts("RIGHT");
    return 0;
  } else {
    for (int i = 0; i < 3; ++i) {
      for (int j = 0; j < 4; ++j) {
        x[i] += dx[j];
        y[i] += dy[j];
        if (check()) {
          puts("ALMOST");
          return 0;
        }
        x[i] -= dx[j];
        y[i] -= dy[j];
      }
    }
  }
  puts("NEITHER");
  return 0;
}
