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.util.Arrays;
import java.util.Scanner;

public class R018A {
    
    class Point implements Comparable<Point> {
        // てん クラス
        int x, y;
        Point(int r, int c) {
            this.x = r;
            this.y = c;
        }
        Point(Point p) {
            this(p.x, p.y);
        }
        /** いどう */
        Point move(int x, int y) { return new Point(this.x + x, this.y + y); }
        public int hashCode() { return x * 17 + y * 31; }
        public boolean equals(Object o) {
            if(!(o instanceof Point)) return false;
            Point that = (Point)o;
            return this.x == that.x && this.y == that.y;
        }
        public int compareTo(Point that) { return this.x != that.x ? this.x - that.x : this.y - that.y; }
        public String toString()  { return "(" + x + ", " + y + ")"; }
    }
   
    private boolean isEqual(int one, int another) {
        return one == another;
    }
   
    class Vector {
        // ベクトル クラス
        int x, y;
        public Vector(int x, int y) {
            this.x = x;
            this.y = y;
        }
        public Vector(Point p1, Point p2) {
            this.x = p1.x - p2.x;
            this.y = p1.y - p2.y;
        }
        /** ないせき */
        public int innerProduct(Vector that) { return this.x * that.x + this.y * that.y; }
        /** ながさ */
        public double length() { return Math.hypot(x, y); }
        /** ながさの2じょう */
        public int lengthSquare() { return x * x + y * y; }
        public int hashCode() { return (int)(x * 17) + (int)(y * 31); }
        public boolean equals(Object o) {
            if(!(o instanceof Vector)) return false;
            Vector that = (Vector)o;
            return isEqual(this.x, that.x) && isEqual(this.y, that.y);
        }
        public String toString() { return x + ", " + y; }
    }
   
    public void debug(Object... objects) { System.err.println(Arrays.deepToString(objects)); }
   
    Point p1, p2, p3;
    Vector v1, v2, v3;
   
    public R018A() {
        Scanner scanner = new Scanner(System.in);
        this.p1 = new Point(scanner.nextInt(), scanner.nextInt());
        this.p2 = new Point(scanner.nextInt(), scanner.nextInt());
        this.p3 = new Point(scanner.nextInt(), scanner.nextInt());
        this.v1 = new Vector(p1, p2);
        this.v2 = new Vector(p2, p3);
        this.v3 = new Vector(p3, p1);
    }
   
    boolean isRight() {
        if(v1.innerProduct(v2) == 0) return true;
        if(v2.innerProduct(v3) == 0) return true;
        if(v3.innerProduct(v1) == 0) return true;
        return false;
    }
   
    //                      N  S   W  E
    //                      U  D   L  R
    int[] dx = new int[] {  0, 0, -1, 1 };
    int[] dy = new int[] { -1, 1,  0, 0 };
   
    boolean isAlmost() {
        for(int i=0; i<dx.length; i++) {
            Point _p1 = p1.move(dx[i], dy[i]);
            Vector _v1 = new Vector(_p1, p2);
            Vector _v2 = new Vector(_p1, p3);
            Vector _v3 = new Vector(p2, p3);
            if(_v1.innerProduct(_v2) == 0 && _v1.lengthSquare() !=0 && _v2.lengthSquare() != 0 )
            { return true; }
            if(_v1.innerProduct(_v3) == 0 && _v1.lengthSquare() !=0 )
            { return true; }
            if(_v2.innerProduct(_v3) == 0 && _v2.lengthSquare() !=0 )
            { return true; }
        }
        for(int i=0; i<dx.length; i++) {
            Point _p2 = p2.move(dx[i], dy[i]);
            Vector _v1 = new Vector(_p2, p1);
            Vector _v2 = new Vector(_p2, p3);
            Vector _v3 = new Vector(p1, p3);
            if(_v1.innerProduct(_v2) == 0 && _v1.lengthSquare() !=0  && _v2.lengthSquare() != 0 )
            { return true; }
            if(_v1.innerProduct(_v3) == 0 && _v1.lengthSquare() !=0 )
            { return true; }
            if(_v2.innerProduct(_v3) == 0 && _v2.lengthSquare() !=0 )
            { return true; }
        }
        for(int i=0; i<dx.length; i++) {
            Point _p3 = p3.move(dx[i], dy[i]);
            Vector _v1 = new Vector(_p3, p1);
            Vector _v2 = new Vector(_p3, p2);
            Vector _v3 = new Vector(p1, p2);
            if(_v1.innerProduct(_v2) == 0 && _v1.lengthSquare() !=0  && _v2.lengthSquare() != 0 )
            { return true; }
            if(_v1.innerProduct(_v3) == 0 && _v1.lengthSquare() !=0 )
            { return true; }
            if(_v2.innerProduct(_v3) == 0 && _v2.lengthSquare() !=0 )
            { return true; }
        }
        return false;
    }
   
    private void process() {
        if(isRight()) { System.out.println("RIGHT"); }
        else if(isAlmost()) { System.out.println("ALMOST"); }
        else System.out.println("NEITHER");
    }
   
    public static void main(String[] args) { new R018A().process(); }
}
