import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.io.PrintWriter;
public class Main{
    public static void main(String[] args)throws IOException{
	br = new BufferedReader(new InputStreamReader(System.in));
	PrintWriter out = new PrintWriter(System.out);
	int c = nextInt();
	while(c-->0){
	    int a = nextInt();
	    int b = nextInt();
	    int r = (int)Math.ceil(2*b/3);
	    if(a>=b || a>3){
		out.println("YES");
	    }else if((a==2 || a==4) && b<4 ){
		out.println("YES");
	    }else{
		out.println("NO");
	    }
	}
	out.close();
    }

    static BufferedReader br;
    static StringTokenizer st = new StringTokenizer("");
    static String next()throws IOException{
	while(!st.hasMoreTokens()){
	    st = new StringTokenizer(br.readLine());
	}
	return st.nextToken();
    }
    static int nextInt()throws IOException{
	return Integer.parseInt(next());
    }
}
