import java.util.*;

public class Poly {
	class Point { long x,y; }

	// return true jika a-b-c belok kiri, false jika bukan
	boolean left(Point a, Point b, Point c){
		return (a.x*b.y + b.x*c.y + c.x*a.y - a.y*b.x - b.y*c.x - c.y*a.x) > 0;
	}

	void solve(){
		Scanner scan = new Scanner(System.in);
		for (int T = scan.nextInt(); T > 0; T--){
			Point[] A = new Point[scan.nextInt()];
			for (int i=0; i<A.length; i++){
				A[i] = new Point();
				A[i].x = scan.nextInt();
				A[i].y = scan.nextInt();
			}
			Point[] B = new Point[scan.nextInt()];
			for (int i=0; i<B.length; i++){
				B[i] = new Point();
				B[i].x = scan.nextInt();
				B[i].y = scan.nextInt();
			}
			Point X = new Point();
			X.x = scan.nextInt();
			X.y = scan.nextInt();

			int aL=0,aR=0,bL=0,bR=0;   // pilih titik 0 sebagai titik paling kiri/kanan
			for (int i=0; i<A.length; i++){
				if (left(X,A[aL],A[i])) aL = i;	 // update titik paling kiri polygon A
				if (!left(X,A[aR],A[i])) aR = i; // update titik paling kanan polygon A
			}
			for (int i=0; i<B.length; i++){
				if (left(X,B[bL],B[i])) bL = i;  // update titik paling kiri polygon B
				if (!left(X,B[bR],B[i])) bR = i; // update titik paling kanan polygon B
			}

			Point P=A[aL], Q=A[aR], R=B[bL], S=B[bR]; // P,Q,R,S didefinisikan diatas

			boolean gray = !left(X,R,P) && left(X,S,Q) && left(R,S,P) && left(R,S,Q);
			boolean cyan = left(X,R,Q) || !left(X,S,P);
			boolean kuning = !left(R,S,P) && !left(R,S,Q);

			if (gray){
				System.out.println("NO VISION");
			} else if (cyan || kuning){
				System.out.println("CLEAR");
			} else {
				System.out.println("ALMOST CLEAR");
			}
		}
	}

	public static void main(String[] args){
		new Poly().solve();
	}
}
