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.*;
import java.io.*;
import java.math.BigInteger;
import java.text.*;
public class Main {
    static long mod = (long)1e9 + 7;
    static long mod1 = 998244353;
    static FastScanner f;
    static PrintWriter pw = new PrintWriter(System.out);
    static Scanner S = new Scanner(System.in);
    static long x0;
    static long y0;
    public static boolean check(int x1, int y1 , int x2, int y2, int x3, int y3) {
        int d12 = ((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2));
        int d13 = ((x1 - x3) * (x1 - x3)) + ((y1 - y3) * (y1 - y3));
        int d23 = ((x3 - x2) * (x3 - x2)) + ((y3 - y2) * (y3 - y2));
        int arr[] = new int[3];
        arr[0] = d12; arr[1] = d13; arr[2] = d23; sort(arr);
        if(arr[2] == arr[1] + arr[0] && arr[2] != 0 && arr[1] != 0 && arr[0] != 0) return true;
        return false;
    }
    public static void solve()throws IOException {
        int x1 = f.nextInt(); int y1 = f.nextInt();
        int x2 = f.nextInt(); int y2 = f.nextInt();
        int x3 = f.nextInt(); int y3 = f.nextInt();
        if(check(x1, y1 , x2, y2, x3, y3)) {pn("RIGHT"); return;}
        if(check(x1 + 1, y1 , x2 , y2 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1 - 1, y1 , x2 , y2 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 + 1 , x2 , y2 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 - 1 , x2 , y2 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 + 1, y2 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 - 1 , y2 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 , y2 , x3 + 1 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 , y2 , x3 - 1 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 , y2 + 1 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 , y2 - 1 , x3 , y3)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 , y2 , x3 , y3 + 1)) {pn("ALMOST"); return;}
        if(check(x1, y1 , x2 , y2 , x3 , y3 - 1)) {pn("ALMOST"); return;}
        pn("NEITHER"); return;
    }
    public static void main(String[] args)throws IOException {
        init();
        int t = 1;
        while(t --> 0) {solve();}
        pw.flush(); 
        pw.close();  
    }
        
/******************************END OF MAIN PROGRAM*******************************************/
    public static void init()throws IOException{if(System.getProperty("ONLINE_JUDGE")==null){f=new FastScanner("");}else{f=new FastScanner(System.in);}}
    public static class FastScanner {
        BufferedReader br;StringTokenizer st;
        FastScanner(InputStream stream){try{br=new BufferedReader(new InputStreamReader(stream));}catch(Exception e){e.printStackTrace();}}
        FastScanner(String str){try{br=new BufferedReader(new FileReader("!a.txt"));}catch(Exception e){e.printStackTrace();}}
        String next(){while(st==null||!st.hasMoreTokens()){try{st=new StringTokenizer(br.readLine());}catch(IOException e){e.printStackTrace();}}return st.nextToken();}
        String nextLine()throws IOException{return br.readLine();}int nextInt(){return Integer.parseInt(next());}long nextLong(){return Long.parseLong(next());}double nextDouble(){return Double.parseDouble(next());}
    }
    public static void pn(Object o){pw.println(o);}
    public static void p(Object o){pw.print(o);}
    public static void pni(Object o){pw.println(o);pw.flush();}
    static class Point implements Comparator<Point>{int x;int y;Point(int x,int y){this.x=x;this.y=y;}Point(){}public int compare(Point a, Point b){if(a.x==b.x)return a.y-b.y;return a.x-b.x;}}
    static int gcd(int a,int b){if(b==0)return a;else{return gcd(b,a%b);}}
    static long gcd(long a,long b){if(b==0)return a;else{return gcd(b,a%b);}}
    static long exgcd(long a,long b){if(b==0){x0=1;y0=0;return a;}long temp=exgcd(b,a%b);long t=x0;x0=y0;y0=t-a/b*y0;return temp;}
    static long pow(long a,long b){long res=1;while(b>0){if((b&1)==1)res=res*a;b>>=1;a=a*a;}return res;}
    static long mpow(long a,long b){long res=1;while(b>0){if((b&1)==1)res=((res%mod)*(a%mod))%mod;b>>=1;a=((a%mod)*(a%mod))%mod;}return res;}
    static boolean isPrime(long n){if(n<=1)return false;if(n<=3)return true;if(n%2==0||n%3==0)return false;for(long i=5;i*i<=n;i=i+6)if(n%i==0||n%(i+2)==0)return false;return true;}
    static HashSet<Long> factors(long n){HashSet<Long> hs=new HashSet<Long>();for(long i=1;i<=(long)Math.sqrt(n);i++){if(n%i==0){hs.add(i);hs.add(n/i);}}return hs;}
    static int[] inpint(int n){int arr[]=new int[n];for(int i=0;i<n;i++){arr[i]=f.nextInt();}return arr;}
    static long[] inplong(int n){long arr[] = new long[n];for(int i=0;i<n;i++){arr[i]=f.nextLong();}return arr;}
    static boolean ise(int x){return ((x&1)==0);}static boolean ise(long x){return ((x&1)==0);}
    static int gnv(char c){return Character.getNumericValue(c);}
    static void sort(int[] a){ArrayList<Integer> l=new ArrayList<>();for(int i:a)l.add(i);Collections.sort(l);for(int i=0;i<a.length;++i)a[i]=l.get(i);}
    static void sort(long[] a){ArrayList<Long> l=new ArrayList<>();for(long i:a)l.add(i);Collections.sort(l);for(int i=0;i<a.length;++i)a[i]=l.get(i);}
    static void sort(ArrayList<Integer> a){Collections.sort(a);}
}