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.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;




 


public class Main { 
    
//  public int [] savedAnswers = new int[100];
//  {
//      for(int i=0;i<savedAnswers.length;i++)
//           savedAnswers[i] = -1;
//      savedAnswers[0]=0;
//  }
//  public int fibSave(int n){
//      
//      if(n==1)
//          return 1;
//      if(savedAnswers[n]!=-1)
//          return savedAnswers[n];
//      return savedAnswers[n] = fibSave(n-2)+fibSave(n-1);
//      
//  }
//  
//   public int findArray(int[] array, int[] subArray) {
//          
//          StringBuilder arr = new StringBuilder(),sub = new StringBuilder();
//          for(int i: array)
//              arr.append(i);
//          for(int j: subArray)
//              sub.append(j);
//          return arr.lastIndexOf(sub.toString());
//      }
//   
//   public int threeN(int n,int counter){
//       counter++;
//       if(n==1)
//           return counter;
//       if(n%2==0)
//          return threeN(n/2,counter);
//       else return threeN(3*n+1,counter);
//       
//   }
//   
//   public static void tris(int n){
//       
//       if(n==0)
//           return;
//       for(int i=0;i<n;i++)
//           System.out.print("*");  
//       System.out.println();
//       tris(n-1);
//       
//      
//      
//   }
//   
//   int n=4;
//   int [][] grid = 
//          {{5,1,2},
//           {6,7,8},
//           {1,8,9}};
//   int [][] mem = new int[n][n];
//   {
//       for(int i=0;i<n;i++)
//          for(int j=0;j<n;j++)
//               mem[i][j]=-1;
//   }
//   
//   public int path(int r,int c){
//       if(r>n || r<0 || c>n || c<0)
//           return 0;
//       if(r==n-1 || c==n-1)
//           return grid[r][c];
//       if(mem[r][c]!=-1)
//           return mem[r][c];
//           
//       int path1 = path(r+1,c);
//       int path2 = path(r,c+1);
//       return mem[r][c]= grid[r][c]+Math.max(path1, path2);
//       
//   }
//   
//   boolean [][] visited = new boolean[n][n];
//   char [][]grid2 = {{'.','.','X','.'},
//                     {'.','X','.','X'},
//                     {'.','.','X','.'},
//                     {'.','.','.','.'}
//           
//   };
//   
//   public int floodFill(int r,int c){
//       
//       if(r<0 || r>=n || c<0 || c>=n || visited[r][c] || grid2[r][c]=='X')
//           return 0;
//       visited[r][c] = true;
//       return 1+floodFill(r+1,c)+floodFill(r-1,c)+floodFill(r,c+1)+floodFill(r,c-1);
//       
//   }
//   
     int [] arr = new int[5];
     boolean flag = false;
//   
     public void twentyThree(int res,int counter){
         
         if(res==23){
             System.out.println("Possible");
             flag= true;
             return;
             }
         
         if(counter==4){
             return;
         }
         
         twentyThree(res+arr[counter+1],counter+1);
         twentyThree(res-arr[counter+1],counter+1);
         twentyThree(res*arr[counter+1],counter+1);
         
     }
     String per = "01234";
     ArrayList<String> perms = new ArrayList<String>();
      
//   
//   
//   public void probe(int r,int c){
//       
//       if(r>=n || r<0 || c>=n || c<0 || visited[r][c] || grid2[r][c]=='X' )
//           return;
//       visited[r][c] = true;
//       probe(r+1,c);
//       probe(r-1,c);
//       probe(r,c-1);
//       probe(r,c+1);
//       
//   }
//   
//   public int numComponents(){
//       int sets = 0;
//       for(int i=0;i<n;i++){
//           for(int j=0;j<n;j++){
//               if(!visited[i][j] && grid2[i][j]!='X'){
//               probe(i,j);
//               sets++;
//               }
//               
//           }
//               
//       }
//       return sets;
//       
//   }
//   
     int x, y;
     boolean [][] visited;
     char [][] grid ;
     public static int res=0;
     public int fillHoles(int r,int c,char val){
         if(r<0 || r>=x || c<0 || c>=y || visited[r][c] || grid[r][c]=='.' || grid[r][c]!=val)
             return 0;
         visited[r][c] = true;
         return 1+fillHoles(r+1,c,val)+fillHoles(r-1,c,val)+fillHoles(r, c+1, val)+fillHoles(r, c-1, val);
         
     }
     
     public void fillHoles2(int r,int c){
         if(r<0 || r>=x || c<0 || c>=y || visited[r][c] || grid[r][c]!='0')
             return ;
         visited[r][c] = true;
         res++;
         fillHoles2(r+1,c);
         fillHoles2(r-1,c);
         fillHoles2(r, c+1);
         fillHoles2(r, c-1);
         
     }
     
      int [][] saved ;
     
    
    public static boolean compute(int [] x, int [] y){
        double [] sides = new double[3];
        for(int i=0;i<=2;i++)
            sides[i] = (double)Math.round(Math.pow(Math.hypot((double)x[i]-(x[(i+1)%3]),(double) y[i]-y[(i+1)%3]),2));
        for(int i=0;i<3;i++)
            if(sides[i]==sides[(i+1)%3]+sides[(i+2)%3]   && Math.min(sides[(i+1)%3], sides[(i+2)%3]) !=0   ){
        //      System.out.println("("+x[i]+","+y[i]+") = ("+x[(i+1)%3]+","+y[(i+1)%3]+") + ("+x[(i+2)%3]+","+y[(i+2)%3]);
                return true;
                }
        return false;
        
    }
      
        public static void main(String args[] ) throws Exception {
        
            Main m = new Main();
            Scanner s = new Scanner(System.in);
            int [] x = new int[3];
            int [] y = new int[3];
            int []dx = {1,0,-1,0};
            int []dy = {0,1,0,-1};
            for(int i=0;i<6;i++)
                if(i%2==0)
                    x[i/2] = s.nextInt();
                else y[i/2] = s.nextInt();
            if(compute(x,y))
            {
                System.out.println("RIGHT");
                return; 
            }
            
            for(int i=0;i<4;i++){
                for(int j=0;j<3;j++){
                    int [] temp_x = Arrays.copyOf(x, x.length);
                    int [] temp_y = Arrays.copyOf(y, y.length);
                    temp_x[j]+=dx[i];
                    temp_y[j]+=dy[i];
                    if(compute(temp_x,temp_y)){
                        System.out.println("ALMOST");
                        return;
                    }
                }
            }
            System.out.println("NEITHER");
            
            
            
            
            
//           long mXsums[] = new long[200004];
//           int[] minIndx = new int [200004];
//           long [] nums = new long[200004];
//           long N=s.nextLong(),K=s.nextLong();
//              for(int i=0;i<N;++i)
//                  nums[i] = s.nextLong();
//
//               long ss=0;
//              for(int i=0;i<K-1;++i)
//                  ss+=nums[(int) (N-i-1)];
//              mXsums[(int) (N-K+1)] = ss;
//              for(int i=(int) (N-K) ; i>=0 ;--i)
//              {
//                  ss+=nums[i];
//                  if(ss>= mXsums[i+1]){
//                      mXsums[i] = ss; minIndx[i] = i;
//                      }
//                  else{
//                      mXsums[i] = mXsums[i+1] ; minIndx[i] = minIndx[i+1];}
//                  ss-= nums[(int) (i+K-1)];
//              }
//               long mx=-1 , a=-1,b=-1;
//              ss=0;
//              for(int i=0;i<K-1;++i)
//                  ss+=nums[i];
//              for(int i=(int) (K-1);i<N-K;++i)
//              {
//                  ss+=nums[i];
//                  if(ss + mXsums[i+1] > mx)
//                  {
//                      mx = ss + mXsums[i+1] ;
//                      a = i-K+1;
//                      b = minIndx[i+1];
//                  }
//                  ss-=nums[(int) (i-K+1)];
//              }
//              System.out.println((a+1)+" "+(b+1));
//      }
            
            
//          int counter = Integer.MIN_VALUE,a=-1,b=-1;
//          for(int i=0;i<n;i++){
//              System.out.println();
//              for(int j=0;j<n;j++)
//                  System.out.print(m.saved[i][j]+" ");
//              }
            
//          System.out.println(m.perms);
//          for(int i=0;i<5;i++)
//              m.arr[i] = s.nextInt();
//          m.twentyThree(m.arr[0], 0);
//          if(!m.flag)
//              System.out.println("Impossible");
            
            
            
//          int x = s.nextInt(),y=s.nextInt();
//          m.x = x;
//          m.y = y;
//          m.visited = new boolean[x][y];
//          m.grid = new char[x][y];
//          for(int i=0;i<x;i++){
//              String str = s.next();
//              for(int j=0;j<y;j++)
//                  m.grid[i][j]=str.charAt(j);
//              }
//          int result = Integer.MIN_VALUE;
//          for(int i=0;i<x;i++)
//              for(int j=0;j<y;j++){
//                  if(!m.visited[i][j] && m.grid[i][j]!='0'){
//                      res=0;
//                      m.fillHoles2(i, j);
//                      result = Math.max(result, res);
//                  //  System.out.println(m.grid[i][j]+":"+ res);
//                  }
//              }
//          System.out.println(res);
        //  m.n = 4;
        //  System.out.println(m.numComponents());
            //System.out.println(m.floodFill(0, 0));
        //System.out.println(new Main().path(0, 0));
            
            
            
            
            
        
        }
}
            
