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
//package codeforces;


import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.Closeable;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.Random;
import java.util.StringTokenizer;

public class A implements Closeable {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    A() throws IOException {
//        reader = new BufferedReader(new FileReader("input.txt"));
//        writer = new PrintWriter(new FileWriter("output.txt"));
    }

    StringTokenizer stringTokenizer;

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    private int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    int inv(int x) {
        return pow(x, MOD - 2);
    }

    void solve() throws IOException {
        class Point {
            int x, y;
            Point(int x, int y) {
                this.x = x;
                this.y = y;
            }
            Point subtract(Point other) {
                return new Point(x - other.x, y - other.y);
            }
            int dotProduct(Point other) {
                return x * other.x + y * other.y;
            }
            int vectorProduct(Point other) {
                return x * other.y - y * other.x;
            }
        }
        Point[] p = new Point[3];
        for(int i = 0; i < 3; i++) {
            p[i] = new Point(nextInt(), nextInt());
        }
        class Utils {
            boolean isRight(Point[] p) {
                for(int i = 0; i < 3; i++) {
                    Point a = p[i];
                    Point b = p[(i + 1) % 3];
                    Point c = p[(i + 2) % 3];
                    Point vb = b.subtract(a);
                    Point vc = c.subtract(a);
                    if(vb.dotProduct(vc) == 0 && vb.vectorProduct(vc) != 0) {
                        return true;
                    }
                }
                return false;
            }
        }
        Utils utils = new Utils();
        if(utils.isRight(p)) {
            writer.println("RIGHT");
            return;
        }
        int[] d = {0, -1, 0, 1};
        for(int i = 0; i < 3; i++) {
            for(int k = 0; k < 4; k++) {
                Point a = new Point(p[i].x + d[k], p[i].y + d[k + 1 & 3]);
                Point b = p[(i + 1) % 3];
                Point c = p[(i + 2) % 3];
                if(utils.isRight(new Point[] {a, b, c})) {
                    writer.println("ALMOST");
                    return;
                }
            }
        }
        writer.println("NEITHER");
    }

    public static void main(String[] args) throws IOException {
        try (A a = new A()) {
            a.solve();
        }
    }

    @Override
    public void close() throws IOException {
        reader.close();
        writer.close();
    }
}