#include <stdio.h>

struct Point { long long x,y; };
Point A[1000], B[1000], X;
int nA, nB, T, aL, aR, bL, bR;

// return true jika a-b-c belok kiri, false jika bukan
#define left(a,b,c) ((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)

int main(){
	scanf("%d",&T);
	while (T--){
		scanf("%d",&nA); for (int i=0; i<nA; i++) scanf("%d %d",&A[i].x,&A[i].y);
		scanf("%d",&nB); for (int i=0; i<nB; i++) scanf("%d %d",&B[i].x,&B[i].y);
		scanf("%d %d",&X.x,&X.y);

		aL = aR = bL = bR = 0;	   // pilih titik 0 sebagai titik paling kiri/kanan
		for (int i=0; i<nA; 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<nB; 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

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

		if (gray){
			puts("NO VISION");
		} else if (cyan || kuning){
			puts("CLEAR");
		} else {
			puts("ALMOST CLEAR");
		}
	}
}
