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.io.*;
import java.util.*;

public class Main implements Runnable {

	public void _main() throws IOException {
		int[] x = new int[3];
		int[] y = new int[3];
		for (int i = 0; i < 3; i++) {
			x[i] = nextInt();
			y[i] = nextInt();			
		}
		int res = 0;
		res = Math.max(res, check(x, y, 0, 1, 2));		
		res = Math.max(res, check(x, y, 2, 0, 1));		
		res = Math.max(res, check(x, y, 1, 2, 0));
		
		String[] answers = {"NEITHER", "ALMOST", "RIGHT"};
		out.print(answers[res]);
	}
	
	int check(int[] x, int[] y, int i, int j, int k) {
        int res = 0;
        for (int dx = -1; dx <= 1; dx++)
        	for (int dy = -1; dy <= 1; dy++)
        		if (dx * dx + dy * dy <= 1) {
        			int cx = x[k] + dx;
        			int cy = y[k] + dy;
                            
        			if (check2(x[i], y[i], x[j], y[j], cx, cy))
        				res = Math.max(res, (dx == 0 && dy == 0) ? 2 : 1);
        			if (check2(x[i], y[i], cx, cy, x[j], y[j]))
        				res = Math.max(res, (dx == 0 && dy == 0) ? 2 : 1);
        			if (check2(cx, cy, x[i], y[i], x[j], y[j]))
        				res = Math.max(res, (dx == 0 && dy == 0) ? 2 : 1);        			
        		}
        return res;
	}
	
	boolean check2(int x1, int y1, int x2, int y2, int x3, int y3) {	
		int dx1 = x1 - x3;
		int dy1 = y1 - y3;
	            
		int dx2 = x2 - x3;
	    int dy2 = y2 - y3;
	            
	    if (dx1 * dy2 - dx2 * dy1 != 0 && dx1 * dx2 + dy1 * dy2 == 0)
	    	return true;
	    return false;
	}

	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;

	private String next() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String rl = in.readLine();
			if (rl == null)
				return null;
			st = new StringTokenizer(rl);
		}
		return st.nextToken();
	}

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

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

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

	public static void main(String[] args) {
		new Thread(new Main()).start();
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			_main();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(202);
		}
	}

}
