#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int main() {
  int i, j, k;
  int n, m;
  int a[3], b[3], c[3];
  double d[4];
  cin >> a[0] >> a[1] >> b[0] >> b[1] >> c[0] >> c[1];
  d[0] = sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]));
  d[1] = sqrt((c[0] - a[0]) * (c[0] - a[0]) + (c[1] - a[1]) * (c[1] - a[1]));
  d[2] = sqrt((b[0] - c[0]) * (b[0] - c[0]) + (b[1] - c[1]) * (b[1] - c[1]));
  sort(d, d + 3);
  if (fabs(d[0] * d[0] + d[1] * d[1] - d[2] * d[2]) < 0.0000001)
    cout << "RIGHT" << endl;
  else {
    for (i = 0; i < 4; i++) {
      int x = a[0] + dx[i], y = a[1] + dy[i];
      d[0] = sqrt((b[0] - x) * (b[0] - x) + (b[1] - y) * (b[1] - y));
      d[1] = sqrt((c[0] - x) * (c[0] - x) + (c[1] - y) * (c[1] - y));
      d[2] =
          sqrt((b[0] - c[0]) * (b[0] - c[0]) + (b[1] - c[1]) * (b[1] - c[1]));
      sort(d, d + 3);
      k = d[0];
      if (k == 0) continue;
      if (fabs(d[0] * d[0] + d[1] * d[1] - d[2] * d[2]) < 0.0000001) {
        cout << "ALMOST" << endl;
        return 0;
      }
    }
    for (i = 0; i < 4; i++) {
      int x = b[0] + dx[i], y = b[1] + dy[i];
      d[0] = sqrt((x - a[0]) * (x - a[0]) + (y - a[1]) * (y - a[1]));
      d[1] =
          sqrt((c[0] - a[0]) * (c[0] - a[0]) + (c[1] - a[1]) * (c[1] - a[1]));
      d[2] = sqrt((x - c[0]) * (x - c[0]) + (y - c[1]) * (y - c[1]));
      sort(d, d + 3);
      k = d[0];
      if (k == 0) continue;
      if (fabs(d[0] * d[0] + d[1] * d[1] - d[2] * d[2]) < 0.0000001) {
        cout << "ALMOST" << endl;
        return 0;
      }
    }
    for (i = 0; i < 4; i++) {
      int x = c[0] + dx[i], y = c[1] + dy[i];
      d[0] =
          sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]));
      d[1] = sqrt((x - a[0]) * (x - a[0]) + (y - a[1]) * (y - a[1]));
      d[2] = sqrt((b[0] - x) * (b[0] - x) + (b[1] - y) * (b[1] - y));
      sort(d, d + 3);
      k = d[0];
      if (k == 0) continue;
      if (fabs(d[0] * d[0] + d[1] * d[1] - d[2] * d[2]) < 0.0000001) {
        cout << "ALMOST" << endl;
        return 0;
      }
    }
    cout << "NEITHER" << endl;
  }
  return 0;
}
