#include <bits/stdc++.h>
using namespace std;
bool isRight(vector<int>& v) {
  vector<int> dist(3);
  dist[0] = (v[0] - v[2]) * (v[0] - v[2]) + (v[1] - v[3]) * (v[1] - v[3]);
  dist[1] = (v[0] - v[4]) * (v[0] - v[4]) + (v[1] - v[5]) * (v[1] - v[5]);
  dist[2] = (v[2] - v[4]) * (v[2] - v[4]) + (v[3] - v[5]) * (v[3] - v[5]);
  sort(dist.begin(), dist.end(), greater<int>());
  return (dist[0] == dist[1] + dist[2]) &&
         (sqrt(dist[0]) < sqrt(dist[1]) + sqrt(dist[2]));
}
int main(int argc, char* argv[]) {
  vector<int> v(6);
  for (int i = 0; i < 6; ++i) cin >> v[i];
  if (isRight(v)) {
    cout << "RIGHT" << endl;
    return 0;
  }
  for (int i = 0; i < 6; ++i) {
    v[i] += 1;
    if (isRight(v)) {
      cout << "ALMOST" << endl;
      return 0;
    }
    v[i] -= 2;
    if (isRight(v)) {
      cout << "ALMOST" << endl;
      return 0;
    }
    v[i] += 1;
  }
  cout << "NEITHER" << endl;
  return 0;
}
