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 static java.lang.Math.PI;
import static java.lang.Math.acos;
import static java.lang.Math.cos;
import static java.lang.Math.sin;
import static java.lang.Math.sqrt;
import static java.lang.System.in;
import static java.lang.System.out;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;
public class A18 {
	public static Scanner sc = new Scanner(in);
	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public boolean check(P[] ver){
		double [] len2 = new double[3];
		if (P.S2(ver[0], ver[1], ver[2])==0) return false;
		for (int i=0; i<3; i++){
			len2[i] = ver[(i+1)%3].dist2(ver[(i+2)%3]);
		}
		for (int i=0; i<3; i++)
			if (len2[i] == len2[(i+1)%3] + len2[(i+2)%3]) return true;
		return false;
	}
	public void run() throws IOException {
		String input;
		String[] inputArray;

		P [] ver = new P[3];
		double []len2 = new double[3];
		input = br.readLine(); inputArray = input.split(" ");
		for (int i=0; i<3; i++)
			ver[i] = new P(Double.valueOf(inputArray[2*i]), Double.valueOf(inputArray[2*i+1]));
		if (check(ver)){
			ln("RIGHT");
			return;
		}
		for (int i=0; i<3; i++){
			for (int a=-1; a<=1; a+=2){
					ver[i].x+=a;
					if (check(ver)){
						ln("ALMOST");
						return;
					}
					ver[i].x-=a;
					ver[i].y+=a;
					if (check(ver)){
						ln("ALMOST");
						return;
					}
					ver[i].y-=a;
				}
		}
	ln("NEITHER");
	ln(sb);
	}

	public static void main(String[] args) throws IOException {
		new A18().run();
	}
	public static void ln(Object obj) {
		out.println(obj);
	}
	
	static class P{
		
			static final double EPS=1e-10;
			static int signum(double x){
				return x<-EPS?-1:x>EPS?1:0;
			}
		static Comparator<P> comp=new Comparator<P>(){
			public int compare(P p1, P p2) {
				return signum(p1.x-p2.x)!=0?signum(p1.x-p2.x):signum(p1.y-p2.y);
			}
		};
		public static  final P O=new P(0,0);
		double x;
		double y;
		P(double _x,double _y){
			x=_x;y=_y;
		}
		
		P add(P a){
			return new P(x+a.x,y+a.y);
		}
		P sub(P a){
			return new P(x-a.x,y-a.y);
		}
		P mul(P a){
			return new P(x*a.x-y*a.y,x*a.y+y*a.x);
		}
		P div(P a){
			double d2=a.dist2(O);
			return new P(dot(a,this)/d2,cross(a,this)/d2);
		}
		
		P conj(){
			return new P(x,-y);
		}
		
		static double dot(P a,P b){
			return  a.x*b.x+a.y*b.y;
		}
		
		static double cross(P a,P b){
			return  a.x*b.y-a.y*b.x;
		}
		
		double dist2(P p){
			return (x-p.x)*(x-p.x)+(y-p.y)*(y-p.y);
		}
		
		double dist(P p){
			return sqrt(dist2(p));
		}
		public double norm(){
			return dist(O);
		}
		
		static int ccw(P a,P b,P c){
			b=b.sub(a);c=c.sub(a);
			if(cross(b,c)>EPS)return 1;
			if(cross(b,c)<-EPS)return -1;
			if(dot(b,c)<-EPS)return 2;
			if(b.norm()<c.norm()-EPS)return -2;
			return 0;
		}
		
		
		static double arg(P a,P o){
			P dir=a.sub(o);
			double s=acos(dir.x/dir.norm());
			return dir.y>0?s:2*PI-s;
		}
		
		P rotate(P o,double arg){
			return this.add(this.sub(o).mul(new P(cos(arg),sin(arg))));
		}
		
		static double S2(P a,P b,P o){
			return cross(a.sub(o),b.sub(o));
		}
		static double S(P a,P b,P o){
			return S2(a,b,o)/2;
		}
		
		static P polar(double abs,double arg){
			return new P(abs*cos(arg),abs*sin(arg));
		}
		
		static P proj(P p,P o){
			return o.mul(new P(dot(p,o)/o.norm(),0));
		}
		public boolean equals(Object obj) {
			if(obj instanceof P){
				P p=(P)obj;
				return signum(x-p.x)==0 && signum(y-p.y)==0;
			}
			return false;
		}
		public String toString(){
			return "("+x+","+y+")";
		}
	}
}
