Problem: Recently Petya walked in the forest and found a magic stick.

Since Petya really likes numbers, the first thing he learned was spells for changing numbers. So far, he knows only two spells that can be applied to a positive integer: 

  1. If the chosen number a is even, then the spell will turn it into 3a/2; 
  2. If the chosen number a is greater than one, then the spell will turn it into a-1. 



Note that if the number is even and greater than one, then Petya can choose which spell to apply.

Petya now has only one number x. He wants to know if his favorite number y can be obtained from x using the spells he knows. The spells can be used any number of times in any order. It is not required to use spells, Petya can leave x as it is.

Input

The first line contains single integer T (1 ≤ T ≤ 10^4) — the number of test cases. Each test case consists of two lines.

The first line of each test case contains two integers x and y (1 ≤ x, y ≤ 10^9) — the current number and the number that Petya wants to get.

Output

For the i-th test case print the answer on it — YES if Petya can get the number y from the number x using known spells, and NO otherwise.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

Example

Input


7
2 3
1 1
3 6
6 8
1 2
4 1
31235 6578234


Output


YES
YES
NO
YES
NO
YES
YES

Solution (in JAVA):

Solution:
import java.io.BufferedReader;

import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
import static java.lang.Math.sqrt;
import static java.lang.Math.round;
import java.lang.Math;
public class Jo {
	public static void main(String args[]) throws IOException 
    { 
		Scanner sc=new Scanner(System.in);
		//System.out.println(largestDivisor(52));
		/*
		int n=sc.nextInt();long a[]=new long[n];
		for(int i=0;i<n;i++)a[i]=sc.nextInt();Arrays.sort(a);
		long s=0;int p=0;long max=a[a.length-1];
		//System.out.println(findGCD(a, n));
		for(int i=0;i<a.length;i++)s+=(max-a[i]);
		System.out.println(s/findGCD(a, n)+" "+findGCD(a, n));
		*/
		int t=sc.nextInt();
		for(int i=0;i<t;i++) {
		int x=sc.nextInt();int y=sc.nextInt();
		
		if(y<=x)System.out.println("YES");
		else {
			if(x==2&&y==3)System.out.println("YES");
			else if((x%2!=0&&x<=3)||(x%2==0)&&x<=2)System.out.println("NO");
			else System.out.println("YES");
			
			//System.out.println((y/x)%1.5==0.0?"YES":"NO");
		}
		//System.out.println((6578234/31235)%1.5 );
		}
		//System.out.println((8/6)%1.5);
	 }
	static long gcd(long a, long a2) 
    { 
        if (a == 0) 
            return a2; 
        return gcd(a2 % a, a); 
    } 
  
    // Function to find gcd of array of 
    // numbers 
    static long findGCD(long[] a, int n) 
    { 
        long result = a[0]; 
        for (int i = 1; i < n; i++) 
            result = gcd(a[i], result); 
  
        return result; 
    } 
	public static int largestDivisor(int n){
		   int divisor = 0;
		   for (int i = 1; i <= n/2; i++)
		       if (n % i == 0) 
		           divisor = i;

		   return divisor; 
		}
	//find the GCD of two numbers in O(min(a,b))
	  static int GCD1(int A, int B) {
		    int m = Math.min(A, B), gcd = 0;
		    for(int i = m; i > 0; --i)
		        if(A % i == 0 && B % i == 0) {
		            gcd = i;
		            break;
		        }
		    return gcd;
		}
	  
	static long sort(int a[],int n)
    {   int b[]=new int[n]; 
        return mergeSort(a,b,0,n-1);}
     
     
    static long mergeSort(int a[],int b[],long left,long right)
    { long c=0;if(left<right)
     {   long mid=left+(right-left)/2;
         c= mergeSort(a,b,left,mid);
         c+=mergeSort(a,b,mid+1,right);
         c+=merge(a,b,left,mid+1,right); }  
        return c;    }
     
     
    static long merge(int a[],int  b[],long left,long mid,long right)
    {long c=0;int i=(int)left;int j=(int)mid; int k=(int)left;
    while(i<=(int)mid-1&&j<=(int)right)
    { if(a[i]<=a[j]) {b[k++]=a[i++]; }
    else    { b[k++]=a[j++];c+=mid-i;}}
    while (i <= (int)mid - 1)   b[k++] = a[i++]; 
    while (j <= (int)right) b[k++] = a[j++];
    for (i=(int)left; i <= (int)right; i++) 
        a[i] = b[i];  return c;  }
	 
	static boolean isPerfectSquare(long x)  
    { 
          
        // Find floating point value of 
        // square root of x. 
        double sr = Math.sqrt(x); 
      
        // If square root is an integer 
        return ((sr - Math.floor(sr)) == 0); 
    } 
    	
	//to check that the string contains the substring      (frequency>=1)
	 static boolean danial(String s) {return s.contains("Danil");}
	 static boolean olya(String s) {return s.contains("Olya");}
	 static boolean Ann(String s) {return s.contains("Ann");}
	 static boolean Slava(String s) {return s.contains("Slava");}
	 static boolean Nikita(String s) {return s.contains("Nikita");}
	 
	 //to check that the string contains the substring only once   (frequency==1)
	  static boolean containsOnce( String s, String k) {
		     //String substring0 = substri.toString();
		     int i = s.indexOf(k);
		    return i != -1 && i == s.lastIndexOf(k);
		}
		 
	  //find the x to the power of n       O(n)
	  int iterativePower(int x,int n)
	  {
	      int result=1;
	      while(n>0)
	      {
	          result=result*x;
	          n--;
	      }
	      return result;
	  }
	  //find x to the power of n         O(log(n))
	  //if (n%2==1).......x^n=x*x^(n-1).....(n-1)is even
	  //if(n%2==0)........x^n=(x^2)^n/2
	  static int binaryExponentiation(int x,int n)
	  {
	      int result=1;
	      while(n>0)
	      {
	    	  //if the given power is odd,it is the start
	    	  //if the given power is even,it is the end
	          if(n % 2 ==1)
	        	  //take one of x to make the power even   ((n-1)%2==0)
	              result=result * x;
	          //whether the power is odd or even
	          x=x*x;
	          n=n/2;
	      }
	      return result;
	  }
	 
	  
	  //find the GCD of two numbers in O(min(a,b))
	  int GCD(int A, int B) {
		    int m = Math.min(A, B), gcd = 0;
		    for(int i = m; i > 0; --i)
		        if(A % i == 0 && B % i == 0) {
		            gcd = i;
		            break;
		        }
		    return gcd;
		}
	  
	  //find the GCD of two numbers in O(log(max(A, B))).
	  //Euclid's algorithm.
	  int GCD2(int A, int B) {
		    if(B==0)
		        return A;
		    else
		        return GCD1(B, A % B);
		}
	
	//count number of digits of number n
	static long countDigit(long n) 
    { 
        return (long)Math.floor(Math.log10(n) + 1); 
    } 
    //min. summation of pairs of divisors
	public static int di(int n) {
		int s;int min=1000000;
		for(int i=1;i*i<=n;i++) {
			if(n%i==0) {
				s=i+(n/i);
				if(s<=min)min=s;
			}
		}
		return min;
	}
	
	public static double squareRoot(int number) {
		double temp;

		double sr = number / 2;

		do {
			temp = sr;
			sr = (temp + (number / temp)) / 2;
		} while ((temp - sr) != 0);

		return sr;
	    }
	static boolean isPerfect(int n) 
    { 
        // To store sum of divisors 
        int sum = 1; 
      
        // Find all divisors and add them 
        for (int i = 2; i * i <= n; i++) 
        { 
            if (n % i==0) 
            { 
                if(i * i != n) 
                    sum = sum + i + n / i; 
                else
                    sum = sum + i; 
            } 
        }  
        // If sum of divisors is equal to 
        // n, then n is a perfect number 
        if (sum == n && n != 1) 
            return true; 
      
        return false; 
    } 
}