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 java.awt.Point;
import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class ProblemA_18 {
    
    final boolean ONLINE_JUDGE=System.getProperty("ONLINE_JUDGE")!=null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok=new StringTokenizer("");
    
    void init() throws FileNotFoundException{
        if (ONLINE_JUDGE){
            in=new BufferedReader(new InputStreamReader(System.in));
            out =new PrintWriter(System.out);
        }
        else{
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }
    
    String readString() throws IOException{
        while(!tok.hasMoreTokens()){
            tok=new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }
    
    int readInt() throws IOException{
        return Integer.parseInt(readString());
    }
    
    public static void main(String[] args){
        new ProblemA_18().run();
    }
    
    public void run(){
        try{
            long t1=System.currentTimeMillis();
            init();
            solve();
            out.close();
            long t2=System.currentTimeMillis();
            System.err.println("Time = "+(t2-t1));
        }catch (Exception e){
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }
    
    int[][] rectangular = {{0, -1}, {-1, 0}, {1, 0}, {0, 1}};
    
    void solve() throws IOException{
        Point[] vortex = new Point[3];
        for (int i = 0; i < 3; i++){
            vortex[i] = new Point(readInt(), readInt());
        }
        if (isRight(vortex)){
            out.print("RIGHT");
            return;
        }
        for (int i = 0; i < 3; i++){
            for (int j = 0; j <4; j++){
                vortex[i].x += rectangular[j][0];
                vortex[i].y += rectangular[j][1];
                if (isRight(vortex)){
                    out.print("ALMOST");
                    return;
                }
                vortex[i].x -= rectangular[j][0];
                vortex[i].y -= rectangular[j][1];
            }
        }
        out.print("NEITHER");
    }   
    
    boolean isRight(Point[] vortex){
        double[] side = new double[3];
        for (int i = 0; i < 3; i++){
            side[i] = d(vortex[i], vortex[(i+1) % 3]);
        }
        Arrays.sort(side);
        if (side[0]+side[1] <= side[2]){
            return false;
        }
        return abs(side[0]*side[0] + side[1]*side[1] - side[2]*side[2]) < 1e-6;
    }
    
    double d(Point a, Point b){
        return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y));
    }
}

