#include <bits/stdc++.h>
using namespace std;
long long rt(long long a, long long b, long long x, long long y, long long p,
             long long q) {
  long long A = (a - x) * (a - x) + (b - y) * (b - y);
  long long B = (x - p) * (x - p) + (y - q) * (y - q);
  long long C = (p - a) * (p - a) + (q - b) * (q - b);
  if ((A + B == C || B + C == A || A + C == B) && (A && B && C))
    return 1;
  else
    return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long x, y, a, b, p, q;
  cin >> x >> y >> a >> b >> p >> q;
  if (rt(a, b, p, q, x, y))
    cout << "RIGHT";
  else if (rt(a + 1, b, p, q, x, y) || rt(a - 1, b, p, q, x, y) ||
           rt(a, b + 1, p, q, x, y) || rt(a, b - 1, p, q, x, y) ||
           rt(a, b, p + 1, q, x, y) || rt(a, b, p - 1, q, x, y) ||
           rt(a, b, p, q + 1, x, y) || rt(a, b, p, q - 1, x, y) ||
           rt(a, b, p, q, x + 1, y) || rt(a, b, p, q, x - 1, y) ||
           rt(a, b, p, q, x, y + 1) || rt(a, b, p, q, x, y - 1))
    cout << "ALMOST";
  else
    cout << "NEITHER";
  return 0;
}
