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
import math
#get the input
xA,yA,xB,yB,xC,yC = map(int, input().split())
def getEdges(n=[0]*6):
       #use Pitagorian Theorem to find the distance between 2 points
       #this distances are the edges of the triangle
       AB = math.sqrt((xA + n[0] - (xB + n[2]))**2 + (yA + n[1] - (yB + n[3]))**2)
       BC = math.sqrt((xB + n[2] - (xC + n[4]))**2 + (yB + n[3] - (yC + n[5]))**2)
       CA = math.sqrt((xC + n[4] - (xA + n[0]))**2 + (yC + n[5] - (yA + n[1]))**2)
       #sort edges in increasing order, because we need to know which one is hypotenuse
       edges = [AB,BC,CA]
       edges.sort()
       return edges
def Triangle(hypotenuse,cat1,cat2):
       if cat1 == 0 or cat2 == 0:
              return False
       #if the Pitagorian Theorem is satisfied, then we have a RIGHT triangle
       #we do this trunc because of error introduced by computer arithmetic
       if math.trunc(hypotenuse*100000)/100000 == math.trunc(math.sqrt(cat1**2 + cat2**2)*100000)/100000:
              return True
       return False

def main():
       #get edges for initial input
       edges = getEdges()
       #check if is right triangle
       isTriangle = Triangle(edges[2],edges[1],edges[0])
       if isTriangle == True:
              print('RIGHT')
              return
       #if not check if it is almost
       else:
              #by adding one to each x and y coordinate and check if is a triangle
              for i in range(6):
                     almostAdd = [0]*6
                     almostAdd[i] = 1
                     edges = getEdges(almostAdd)
                     almost = Triangle(edges[2],edges[1],edges[0])
                     #if is a triangle print ALMOST
                     if almost:
                            print('ALMOST')
                            return
              #or by substracting one from each x and y coordinate
              for i in range(6):
                     almostAdd = [0]*6
                     almostAdd[i] = -1
                     edges = getEdges(almostAdd)
                     almost = Triangle(edges[2],edges[1],edges[0])
                     #if is a triangle print ALMOST
                     if almost:
                            print('ALMOST')
                            return
       #If none of the above returned, print NEITHER
       print('NEITHER')
       return
main()