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.*;
import static java.lang.Math.*;
import static java.util.Arrays.fill;
import static java.util.Arrays.binarySearch;
import static java.util.Arrays.sort;

public class Main {
	public static void main(String[] args) throws IOException {
		new Thread(null, new Runnable() {
			public void run() {
				try {
					try {
						if (new File("input.txt").exists())
							System.setIn(new FileInputStream("input.txt"));
					} catch (SecurityException e) {}
					new Main().run();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}, "1", 1L << 24).start(); 
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");
	
	Point up = new Point(0, 1);
	Point rt = new Point(1, 0);
	Point dn = new Point(0, -1);
	Point lt = new Point(-1, 0);
	Point[] offset = new Point[] { up, rt, dn, lt };
	
	Point[] ps = new Point [3];
	
	void run() throws IOException {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		
		ps[0] = new Point(nextInt(), nextInt());
		ps[1] = new Point(nextInt(), nextInt());
		ps[2] = new Point(nextInt(), nextInt());
		
		if (rightTriangle(ps[0], ps[1], ps[2])) {
			out.println("RIGHT");
		} else if (almostTriangle(ps)) {
			out.println("ALMOST");
		} else {
			out.println("NEITHER");
		}
		
		out.close();
	}

	boolean almostTriangle(Point[] ps) {
		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 4; j++)
				if (rightTriangle(ps[i].add(offset[j]), ps[(i + 1) % 3], ps[(i + 2) % 3]))
					return true;
		return false;
	}

	boolean rightTriangle(Point p1, Point p2, Point p3) {
		if (rightAngle(p1, p2, p3))
			return true;
		if (rightAngle(p2, p3, p1))
			return true;
		if (rightAngle(p3, p1, p2))
			return true;
		return false;
	}
	
	boolean rightAngle(Point p0, Point p1, Point p2) {
		return area(p0, p1, p2) > 0L && scal(p1.sub(p0), p2.sub(p0)) == 0L;
	}
	
	long area(Point p0, Point p1, Point p2) {
		return abs(cross(p1.sub(p0), p2.sub(p0)));
	}
	
	long cross(Point p1, Point p2) {
		return p1.x * p2.y - p1.y * p2.x;
	}
	
	long scal(Point p1, Point p2) {
		return p1.x * p2.x + p1.y * p2.y;
	}
	
	class Point {
		long x;
		long y;
		
		Point(long x, long y) {
			this.x = x;
			this.y = y;
		}
		
		Point add(Point v) {
			return new Point(x + v.x, y + v.y);
		}
		
		Point sub(Point v) {
			return new Point(x - v.x, y - v.y);
		}
	}
	
	String nextToken() throws IOException {
		while (!st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		
		return st.nextToken();
	}
	
	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}
	
	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}
	
	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
	
	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
	
	boolean EOF() throws IOException {
		while (!st.hasMoreTokens()) {
			String s = in.readLine();
			
			if (s == null) {
				return true;
			}
			
			st = new StringTokenizer(s);
		}
		
		return false;
	}
}
