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.util.Scanner;

public class Problem7 {
	
	static int[] x = new int[3];
	static int[] y = new int[3];
	
	// Calculate the are by using Matrix - Determinant formula
	public static int getDeterminant() {
		int a = x[0] * y[1] + x[1] * y[2] + x[2] * y[0];
		int b = y[0] * x[1] + y[1] * x[2] + y[2] * x[0];
		return a - b;
	}
	
	// Get square of Euclidean Distance
	public static int getDistance( int i , int j ) {
		int dx = x[i] - x[j];
		int dy = y[i] - y[j];
		return dx * dx + dy * dy;
	}
	
	public static boolean check() {
		
		// Area of triangle should be larger than 0
		if ( getDeterminant() == 0 )
			return false;
		
		int d01 = getDistance( 0 , 1 );
		int d02 = getDistance( 0 , 2 );
		int d12 = getDistance( 1 , 2 );
		
		// Check if it is right triangle
		
		// Check if the largest one is E(1,2)
		if ( d01 + d02 == d12 )
			return true;
		
		// Check if the largest one is E(0,2)
		if ( d01 + d12 == d02 )
			return true;
		
		// Check if the largest one is E(0,1)
		if ( d02 + d12 == d01 )
			return true;
		
		return false;
		
	}
	
	public static void main( String[] args ) {
		
		Scanner scan = new Scanner( System.in );
		
		for ( int i = 0 ; i < 3 ; i++ ) {
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		
		// Check if it is already right triangle
		if ( check() )
			System.out.println( "RIGHT" );
		
		else {
			
			boolean found = false;
			
			// Change all points by 1 unit
			for ( int i = 0 ; i < 3 ; i++ )
				for ( int j = -1 ; j <= 1 ; j = j + 2 ) {
					
					// Change x
					x[i] += j;
					// Check if it is right triangle now
					found = found || check();
					// Reset x
					x[i] -= j;
					
					// Change y
					y[i] += j;
					// Check if it is right triangle now
					found = found || check();
					// Reset y
					y[i] -= j;
					
				}
			
			// If we found a right triangle by moving a point by 1 unit
			if ( found )
				System.out.println( "ALMOST" );
			
			// We could not found a right triangle
			else
				System.out.println( "NEITHER" );
			
		}
		
	}
	
}