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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;


public class Main {

	static boolean visited[] ; 
	static boolean ends[] ;
	static long mod = 1000000007 ;
	static int lens[] ; 
	static int seeds[] ; 
	static char a[] ;
	static double total ; 
	public static ArrayList adj[] ; 
	public static long x,y ;
	public static ArrayList<Integer> xx ;	
	public static double dp[][][] ;
	public static void main(String[] args) throws IOException, InterruptedException {
		Scanner sc =  new Scanner(System.in) ;
		PrintWriter pw = new PrintWriter(System.out);

		int []a = new int[6] ; 
		for (int i = 0; i < a.length; i++)
		{
			a[i]=sc.nextInt() ;
		}
		if(r(a))
		{System.out.println("RIGHT"); return ;}
		for (int i = 0; i < a.length; i++)
		{
			a[i]-=1 ;
			if(r(a))
			{System.out.println("ALMOST"); return;}
			a[i]+=2 ;
			if(r(a))
			{System.out.println("ALMOST"); return;}
			a[i]-=1 ;

		}

		System.out.println("NEITHER");


	}
	public static boolean r(int []a)
	{

		double A = (1.0*(a[3]-a[1])*(a[3]-a[1])+1.0*(a[2]-a[0])*(a[2]-a[0])) ;
		double B = (1.0*(a[5]-a[1])*(a[5]-a[1])+1.0*(a[4]-a[0])*(a[4]-a[0])) ;
		double C = (1.0*(a[3]-a[5])*(a[3]-a[5])+1.0*(a[2]-a[4])*(a[2]-a[4])) ;

		if(A==0 || B==0 || C==0)
			return false ;

		if(A+B==C || A+C==B || B+C==A )
			return true ; 
		else
			return false;




	}





	static boolean contains(int p[], int x)
	{

		for (int i = 0; i < p.length; i++)
		{
			if(x==p[i]) return true ;
		}
		return false; 
	}
	static void generate(int n)
	{
		if(n>=10000000)
			return ; 

		xx.add(n) ; 
		generate(Integer.parseInt("4"+n)) ;
		generate(Integer.parseInt("7"+n)) ;

	}


	static long pow(long base, int exp) {
		long res = 1;
		while(exp > 0) {
			if(exp % 2 == 1) {
				res = (res * base);
			}

			base = (base * base) ;
			exp /= 2;
		}

		return res;
	}
































	public static void dfss(int root , int len)
	{
		visited[root]=true ; 
		if(ends[root] && root!=0) lens[root] = len ; 

		for (int i = 0; i < adj[root].size(); i++)
		{
			int c= (int) adj[root].get(i) ; 
			if(visited[c]==false)
				dfss(c, len+1);
		}
	}

	public static void pr(int root ,  int seed){
		visited[root] = true ;
		int dv = adj[root].size()-1 ; 
		if(root==0) dv++ ;

		for (int i = 0; i < adj[root].size(); i++)
		{
			int c = (int)adj[root].get(i) ; 
			seeds[c]=dv*seed ;
		}

		for (int i = 0; i < adj[root].size() ; i++)
		{
			int c = (int)adj[root].get(i) ; 
			if(visited[c]==false)
				pr(c , seeds[c]);

		}

	}



	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

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

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

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

		public String nextLine() throws IOException {
			return br.readLine();
		}

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

		public boolean ready() throws IOException {
			return br.ready();
		}

		public int[] nextIntArray(int n) throws IOException {
			int arr[] = new int[n];
			for (int i = 0; i <n ; i++)
			{
				arr[i] = Integer.parseInt(next());
			}
			return arr;
		}
		public long[] nextLongArray(int n) throws IOException {
			long arr[] = new long[n];
			for (int i = 0; i <n ; i++)
			{
				arr[i] = Long.valueOf(next());
			}
			return arr;
		}
	}


	public static long getGCD(long n1, long n2) {
		if (n2 == 0) {
			return n1;
		}
		return getGCD(n2, n1 % n2);
	}


	public static void shuffleA(ArrayList<Integer> ss){
		if(ss.size()==1)
			return ; 
		for (int i = 0; i < ss.size(); i++)
		{
			Random rand = new Random();

			int  n = rand.nextInt(ss.size()-1) + 0;

			int tmp = ss.get(n);
			ss.remove(n);
			ss.add(tmp);
		}
	}
	public static void shuffle(int[]x){
		if(x.length==1)
			return ; 
		for (int i = 0; i < x.length; i++)
		{
			Random rand = new Random();

			int  n = rand.nextInt(x.length-1) + 0;

			int tmp = x[n];
			x[n]=x[i] ;
			x[i]=tmp;
		}
	}
	public static int binaryy(int[] arr, int l, int r, int x)   /// begin by 0 and n-1
	{
		if (r>=l)
		{
			int mid = l + (r - l)/2;
			if (arr[mid]== x)
				return mid;
			if (arr[mid]> x)
				return binaryy(arr, l, mid-1, x);
			return binaryy(arr, mid+1, r, x);
		}
		return -1;
	}

	/// searching for the index of first elment greater than x
	public static int binary1(int[]arr , int x) {
		int low = 0, high = arr.length; // numElems is the size of the array i.e arr.size() 
		while (low != high) {
			int mid = (low + high) / 2; // Or a fancy way to avoid int overflow
			if (arr[mid] <= x) {
				/* This index, and everything below it, must not be the first element
				 * greater than what we're looking for because this element is no greater
				 * than the element.
				 */
				low = mid + 1;
			}
			else {
				/* This element is at least as large as the element, so anything after it can't
				 * be the first element that's at least as large.
				 */
				high = mid;
			}
		}
		return low ; // return high ; 
	}


	////// searching for last element less than X 
	//	public static int binary2(pair[]arr , int x) {
	//		int low = 0, high = arr.length; // numElems is the size of the array i.e arr.size() 
	//		while (low != high) {
	//			int mid = (low + high) / 2; // Or a fancy way to avoid int overflow
	//			if (arr[mid].x >= x) {
	//				/* This index, and everything below it, must not be the first element
	//				 * greater than what we're looking for because this element is no greater
	//				 * than the element.
	//				 */
	//				high=mid;
	//			}
	//			else {
	//				/* This element is at least as large as the element, so anything after it can't
	//				 * be the first element that's at least as large.
	//				 */
	//				low = mid+1 ; 
	//			}
	//		}
	//		return low ; // return high ; 
	//	}







	public static int binary(long []arr , long target , int low , long shift) {
		int high = arr.length; 
		while (low != high) {
			int mid = (low + high) / 2; 
			if (arr[mid]-shift <= target) {
				low = mid + 1;
			}
			else {
				high = mid;
			}
		}
		return low ; // return high ; 
	}
	public static boolean isLetter(char x){
		if(x+0 <=122 && x+0 >=97 )
			return true ;
		else if (x+0 <=90 && x+0 >=65 )
			return true ; 
		else return false; 
	}
	public static long getPrimes(long x ){
		if(x==2 || x==3 || x==1)
			return 2 ;
		if(isPrime(x))
			return 5 ;
		for (int i = 2; i*i<=x; i++)
		{
			if(x%i==0 && isPrime(i))
				return getPrimes(x/i) ;
		}
		return -1;
	}







	public static int lis( int[]a , int n){
		int lis[] = new int[n] ; 
		Arrays.fill(lis,1) ; 

		for(int i=1;i<n;i++)
			for(int j=0 ; j<i; j++)
				if (a[i]>a[j] &&  lis[i] < lis[j]+1)   
					lis[i] = lis[j] + 1;           

		int max = lis[0];

		for(int i=1; i<n ; i++)
			if (max < lis[i])
				max = lis[i] ;
		return (max);

		//			ArrayList<Integer> s = new ArrayList<Integer>() ;
		//			for (int i = n-1; i >=0; i--)
		//			{
		//				if(lis[i]==max)
		//				{
		//					s.add(a[i].z);
		//					max --; 
		//				}
		//			}
		//
		//			for (int i = s.size()-1 ; i>=0 ;  i--)
		//			{
		//				System.out.print(s.get(i)+" ");
		//			}
		//
	}
	public static int calcDepth(Vertix node){
		if(node.depth>0) return node.depth; 
		// meaning it has been updated before;
		if(node.parent != null)
			return 1+ calcDepth(node.parent);
		else
			return -1;
	}

	public static boolean isPrime (long num){
		if (num < 2) return false;
		if (num == 2) return true;
		if (num % 2 == 0) return false;
		for (int i = 3; i * i <= num; i += 2)
			if (num % i == 0) return false;
		return true;
	}


	public static ArrayList<Long> getDiv(Long n)
	{
		ArrayList<Long>  f = new ArrayList<Long>() ; 

		while (n%2==0)
		{
			if(!f.contains(2l))
			{f.add((long) 2) ;}
			n /= 2;
		}

		// n must be odd at this point.  So we can
		// skip one element (Note i = i +2)
		for (long i = 3; i <= Math.sqrt(n); i+= 2)
		{
			// While i divides n, print i and divide n
			while (n%i == 0)
			{
				if(!f.contains(i))f.add(i);
				n /= i;
			}
		}

		// This condition is to handle the case whien
		// n is a prime number greater than 2
		if (n > 2)
			if(!f.contains(n))f.add(n);


		return f ;



	}

	//		public static boolean dfs(Vertix v , int target){
	//			try{
	//				visited[v.i]= true ;
	//			} catch (NullPointerException e)
	//			{
	//				System.out.println(v.i);
	//			}
	//			if(v.i == target)
	//
	//				return true ;
	//			for (int i =0 ; i< v.neighbours.size() ; i++)
	//			{ 
	//
	//				Vertix child = v.neighbours.get(i) ;
	//				if(child.i == target){
	//					found = true  ; 
	//				}
	//				if(visited[child.i]==false){
	//					found |= dfs(child, target) ;
	//				}
	//			}
	//			return found; 
	//		}









	public static class Vertix{
		long i ; 
		int depth ;
		ArrayList<Vertix> neighbours ; 
		Vertix parent ; 
		Vertix child ; 


		public Vertix(long i){
			this.i = i ;
			this.neighbours = new ArrayList<Vertix> () ;
			this.parent = null ;
			depth =-1;
			this.child = null ;
		}
	}

	public static class pair implements Comparable<pair> {
		int x ; 
		int y ; 




		public pair(int x, int y ){

			this.x=x ; 
			this.y =y ;


		}


		@Override
		public int compareTo(pair p) {
			if(this.x > p.x)
				return 1 ; 
			else if (this.x == p.x ) 
				if(this.y == 1 )
					return 1 ; 
				else if (p.y ==1)
					return -1 ; 
				else 
					return 0;
			else 
				return -1 ;
		}




	}

	public static class pair2 implements Comparable<pair2>{
		int i ; 
		int j ;
		int plus ;

		public pair2(int i , int j , int plus){
			this.i =i ;
			this.j = j ; 
			this.plus = plus ;
		}

		@Override
		public int compareTo(pair2 p) {
			if(this.j > p.j)
				return 1 ; 
			else if (this.j == p.j) return 0 ;
			else 
				return -1 ;
		}


	}
	public static class point implements  Comparable<point>
	{
		int x, y ; 
		public point(int x,int y){
			this.x=x ; this.y=y;
		}
		@Override
		public boolean equals(Object o) {

			// If the object is compared with itself then return true  
			if (o == this) {
				return true;
			}

			/* Check if o is an instance of Complex or not
	          "null instanceof [type]" also returns false */
			if (!(o instanceof point)) {
				return false;
			}

			// typecast o to Complex so that we can compare data members 
			point c = (point) o;

			// Compare the data members and return accordingly 
			return Integer.compare(x, c.x) == 0
					&& Integer.compare(y, c.y) == 0;
		}
		@Override
		public int compareTo(point p) {
			if(this.x == p.x && this.y ==p.y)
				return 0 ; 
			else
				return -1 ; 
		}

		@Override
		public int hashCode()
		{
			return 15+x+(y%2) ;
		}



	}


}