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.*;
import java.lang.*;
import java.util.*;

public class Solver {
    public static void main(String[] args) {
        FastReader in = new FastReader();
        PrintWriter out = new PrintWriter(System.out);
        TaskC solver = new TaskC(in, out);
        solver.solveB();
        out.close();
    }

    static class TaskC {
        FastReader in;
        PrintWriter out;

        public TaskC(FastReader in, PrintWriter out) {
            this.in = in;
            this.out = out;
        }

        public void solveA() {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt();
                int x = in.nextInt();
                int a = in.nextInt();
                int b = in.nextInt();
                int minP = min(a, b);
                int maxP = max(a, b);
                int diffMin = minP - 1;
                int diffMax = n - maxP;

                if (diffMin <= x) {
                    minP = 1;
                    x -= diffMin;
                } else {
                    minP -= x;
                    x = 0;
                }

                if (diffMax <= x) {
                    maxP = n;
                    x -= diffMax;
                } else {
                    maxP += x;
                    x = 0;
                }

                out.println((maxP-minP));
            }
        }

        public void solveB() {
            int t = in.nextInt();
            while (t-- > 0) {
                long x = in.nextLong();
                long y = in.nextLong();
                if (x >= y) {
                    out.println("YES");
                } else {
                    checkForPossiblities(x, y);
                }
            }
        }

        private void checkForPossiblities(long a, long b) {
            int iter = 10000;
            Set<Long> set = new HashSet<>();
            while (iter-- > 0) {
                if (a == b) {
                    out.println("YES");
                    return;
                } else if (a > b) {
                    out.println("YES");
                    return;
                } else {
                    if (set.contains(a)) {
                        break;
                    }
                    set.add(a);
                    if (a % 2 == 0) {
                        a = (3 * a)/2;
                    } else {
                        a--;
                    }
                }
            }
            out.println("NO");
        }
    }

    private static long gcd(long a, long b) {
        if (a == 0) {
            return b;
        }
        return gcd(b % a, a);
    }

    private static long lcm(long a, long b) {
        return (a * b) / gcd(a, b);
    }

    private static int min(int a, int b) {
        return a < b ? a : b;
    }

    private static int max(int a, int b) {
        return a > b ? a : b;
    }

    private static int min(ArrayList<Integer> list) {
        int min = Integer.MAX_VALUE;
        for (int el : list) {
            if (el < min) {
                min = el;
            }
        }
        return min;
    }

    private static int max(ArrayList<Integer> list) {
        int max = Integer.MIN_VALUE;
        for (int el : list) {
            if (el > max) {
                max = el;
            }
        }
        return max;
    }

    private static int min(int[] list) {
        int min = Integer.MAX_VALUE;
        for (int el : list) {
            if (el < min) {
                min = el;
            }
        }
        return min;
    }

    private static int max(int[] list) {
        int max = Integer.MIN_VALUE;
        for (int el : list) {
            if (el > max) {
                max = el;
            }
        }
        return max;
    }

    private static void fill(int[] array, int value) {
        for (int i = 0; i < array.length; i++) {
            array[i] = value;
        }
    }


    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        int[] nextIntArray(int n) {
            int[] array = new int[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextInt();
            }
            return array;
        }
    }
}