At a geometry lesson Bob learnt that a triangle is called right-angled if it is nondegenerate and one of its angles is right. Bob decided to draw such a triangle immediately: on a sheet of paper he drew three points with integer coordinates, and joined them with segments of straight lines, then he showed the triangle to Peter. Peter said that Bob's triangle is not right-angled, but is almost right-angled: the triangle itself is not right-angled, but it is possible to move one of the points exactly by distance 1 so, that all the coordinates remain integer, and the triangle become right-angled. Bob asks you to help him and find out if Peter tricks him. By the given coordinates of the triangle you should find out if it is right-angled, almost right-angled, or neither of these.

Input

The first input line contains 6 space-separated integers x1, y1, x2, y2, x3, y3 — coordinates of the triangle's vertices. All the coordinates are integer and don't exceed 100 in absolute value. It's guaranteed that the triangle is nondegenerate, i.e. its total area is not zero.

Output

If the given triangle is right-angled, output RIGHT, if it is almost right-angled, output ALMOST, and if it is neither of these, output NEITHER.

Examples

Input

0 0 2 0 0 1


Output

RIGHT


Input

2 3 4 5 6 6


Output

NEITHER


Input

-1 0 2 0 0 1


Output

ALMOST
#include <bits/stdc++.h>
using namespace std;
double cal_len(double x1, double y1, double x2, double y2) {
  double m1 = (x2 - x1) * (x2 - x1);
  double m2 = (y2 - y1) * (y2 - y1);
  return m1 + m2;
}
int isRightAngle(double x1, double y1, double x2, double y2, double x3,
                 double y3) {
  if (x1 == x2 && y1 == y2 || x1 == x3 && y1 == y3 || x3 == x2 && y3 == y2) {
    return 0;
  }
  double m1 = cal_len(x1, y1, x2, y2);
  double m2 = cal_len(x1, y1, x3, y3);
  double m3 = cal_len(x3, y3, x2, y2);
  if (m1 >= m2 && m1 >= m3) {
    if (m1 == m2 + m3) return 1;
  } else if (m2 >= m1 && m2 >= m3) {
    if (m2 == m1 + m3) return 1;
  } else if (m3 >= m1 && m3 >= m2) {
    if (m3 == m1 + m2) return 1;
  }
  return 0;
}
int main() {
  int x1, x2, x3, y1, y2, y3;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  if (isRightAngle(x1, y1, x2, y2, x3, y3)) {
    printf("RIGHT\n");
    return 0;
  }
  int a[12];
  a[0] = x1;
  a[1] = y1;
  a[2] = x2;
  a[3] = y2;
  a[4] = x3;
  a[5] = y3;
  int k = 0;
  for (int i = 0; i <= 5; i++) {
    int temp = a[i];
    a[i] = a[i] + 1;
    k = isRightAngle(a[0], a[1], a[2], a[3], a[4], a[5]);
    if (k == 1) break;
    a[i] = a[i] - 2;
    k = isRightAngle(a[0], a[1], a[2], a[3], a[4], a[5]);
    if (k == 1) break;
    a[i] = temp;
  }
  if (k == 1)
    printf("ALMOST\n");
  else
    printf("NEITHER\n");
  return 0;
}
