//package CodeforcesProject;

import java.io.*;
import java.lang.*;
import java.util.*;
import java.util.function.BiFunction;

public class Main extends IO {

    public static void main(String[] args) throws Exception {
        int quantity = readInt();
        for (int i = 0; i < quantity; i++) {
            int[] day = readArrayInt(" ");
            if (day[1] <= day[0]) {
                writeString("YES", "\n");
            } else {
                long l = 0;
                long r = day[0] + 1;
                while (r - l > 2) {
                    long m1 = l + ((r - l) / 3);
                    long m2 = r - ((r - l) / 3);
                    if ((m1 + Math.ceil((float) day[1] / (m1 + 1))) < (m2 + Math.ceil((float) day[1] / (m2 + 1)))) {
                        r = m2;
                    } else if ((m1 + Math.ceil((float) day[1] / (m1 + 1))) > (m2 + Math.ceil((float) day[1] / (m2 + 1)))) {
                        l = m1;
                    } else {
                        break;
                    }
                }
                boolean check = false;
                for (long i1 = l - 1; i1 < r + 1; i1++) {
                    if (i1 >= 0 && (i1 + Math.ceil((float) day[1] / (i1 + 1)) <= day[0])) {
                        writeString("YES", "\n");
                        check = true;
                        break;
                    }
                }
                if (!check) {
                    writeString("NO", "\n");
                }
            }
        }
        print();
    }
}

class math {

    protected static int remains = 0x989687;

    protected static int gcd(int a, int b) { // NOD
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

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

    protected static float gcd(float a, float b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    protected static double gcd(double a, double b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    protected static double lcm(double a, double b) { // NOK
        return a / gcd(a, b) * b;
    }

    protected static float lcm(float a, float b) { // NOK
        return a / gcd(a, b) * b;
    }

    protected static int lcm(int a, int b) { // NOK
        return a / gcd(a, b) * b;
    }

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

    protected static double log(double value, int base) {
        return Math.log(value) / Math.log(base);
    }

    protected static long factorial(int number) {
        if (number < 0) {
            return 0;
        }
        return solveFactorial(number);
    }

    private static long solveFactorial(int number) {
        if (number > 0) {
            return solveFactorial(number - 1) * number;
        }
        return 1;
    }
}

class Int implements Comparable<Integer> {

    protected int value;

    Int(int value) {
        this.value = value;
    }

    @Override
    public int compareTo(Integer o) {
        return (this.value < o) ? -1 : ((this.value == o) ? 0 : 1);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Integer) {
            return value == (Integer) obj;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return value;
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
    }
}

class Fraction<T extends Number> extends Pair {

    private Fraction(T dividend, T divider) {
        super(dividend, divider);
        reduce();
    }

    protected static <T extends Number> Fraction<T> createFraction(T dividend, T divider) {
        return new Fraction<>(dividend, divider);
    }

    protected void reduce() {
        if (getFirstElement() instanceof Integer) {
            Integer Dividend = (Integer) getFirstElement();
            Integer Divider = (Integer) getSecondElement();
            int gcd = math.gcd(Dividend, Divider);
            setFirst(Dividend / gcd);
            setSecond(Divider / gcd);
        } else if (getFirstElement() instanceof Long) {
            Long Dividend = (Long) getFirstElement();
            Long Divider = (Long) getSecondElement();
            long gcd = math.gcd(Dividend, Divider);
            setFirst(Dividend / gcd);
            setSecond(Divider / gcd);
        } else if (getFirstElement() instanceof Float) {
            Float Dividend = (Float) getFirstElement();
            Float Divider = (Float) getSecondElement();
            float gcd = math.gcd(Dividend, Divider);
            setFirst(Dividend / gcd);
            setSecond(Divider / gcd);
        } else if (getFirstElement() instanceof Double) {
            Double Dividend = (Double) getFirstElement();
            Double Divider = (Double) getSecondElement();
            double gcd = math.gcd(Dividend, Divider);
            setFirst(Dividend / gcd);
            setSecond(Divider / gcd);
        }
    }

    protected void addWithoutReturn(Fraction number) throws UnsupportedOperationException {
        add(number, 0);
    }

    private Fraction add(Fraction number, int function) throws UnsupportedOperationException {
        if (getFirstElement() instanceof Integer && number.getFirstElement() instanceof Integer) {
            Integer Dividend = (Integer) getFirstElement();
            Integer Divider = (Integer) getSecondElement();
            Integer Dividend1 = (Integer) number.getFirstElement();
            Integer Divider1 = (Integer) number.getSecondElement();
            Integer lcm = math.lcm(Divider, Divider1);
            if (function == 0) {
                setFirst((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1);
                setSecond(lcm);
                reduce();
                return null;
            }
            Fraction result = Fraction.createFraction((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1, lcm);
            result.reduce();
            return result;

        } else if (getFirstElement() instanceof Long && number.getFirstElement() instanceof Long) {
            Long Dividend = (Long) getFirstElement();
            Long Divider = (Long) getSecondElement();
            Long Dividend1 = (Long) number.getFirstElement();
            Long Divider1 = (Long) number.getSecondElement();
            Long lcm = math.lcm(Divider, Divider1);
            if (function == 0) {
                setFirst((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1);
                setSecond(lcm);
                reduce();
                return null;
            }
            Fraction result = Fraction.createFraction((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1, lcm);
            result.reduce();
            return result;
        } else if (getFirstElement() instanceof Float && number.getFirstElement() instanceof Float) {
            Float Dividend = (Float) getFirstElement();
            Float Divider = (Float) getSecondElement();
            Float Dividend1 = (Float) number.getFirstElement();
            Float Divider1 = (Float) number.getSecondElement();
            Float lcm = math.lcm(Divider, Divider1);
            if (function == 0) {
                setFirst((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1);
                setSecond(lcm);
                reduce();
                return null;
            }
            Fraction result = Fraction.createFraction((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1, lcm);
            result.reduce();
            return result;
        } else if (getFirstElement() instanceof Double && number.getFirstElement() instanceof Double) {
            Double Dividend = (Double) getFirstElement();
            Double Divider = (Double) getSecondElement();
            Double Dividend1 = (Double) number.getFirstElement();
            Double Divider1 = (Double) number.getSecondElement();
            Double lcm = math.lcm(Divider, Divider1);
            if (function == 0) {
                setFirst((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1);
                setSecond(lcm);
                reduce();
                return null;
            }
            Fraction result = Fraction.createFraction((lcm / Divider) * Dividend + (lcm / Divider1) * Dividend1, lcm);
            result.reduce();
            return result;
        } else {
            throw new UnsupportedOperationException();
        }
    }

    protected Fraction addWithReturn(Fraction number) {
        return add(number, 1);
    }

    protected void multiplyWithoutReturn(Fraction number) throws UnsupportedOperationException {
        multiply(number, 0);
    }

    protected Fraction multiplyWithReturn(Fraction number) throws UnsupportedOperationException {
        return multiply(number, 1);
    }

    private Fraction multiply(Fraction number, int function) throws UnsupportedOperationException {
        if (getFirstElement() instanceof Integer && number.getFirstElement() instanceof Integer) {
            Integer first = (Integer) getFirstElement() * (Integer) number.getFirstElement();
            Integer second = (Integer) getSecondElement() * (Integer) number.getSecondElement();
            if (function == 0) {
                setFirst(first);
                setSecond(second);
                reduce();
                return null;
            }
            Fraction answer = Fraction.createFraction(first, second);
            answer.reduce();
            return answer;
        } else if (getFirstElement() instanceof Long && number.getFirstElement() instanceof Long) {
            Long first = (Long) getFirstElement() * (Long) number.getFirstElement();
            Long second = (Long) getSecondElement() * (Long) number.getSecondElement();
            if (function == 0) {
                setFirst(first);
                setSecond(second);
                reduce();
                return null;
            }
            Fraction answer = Fraction.createFraction(first, second);
            answer.reduce();
            return answer;

        } else if (getFirstElement() instanceof Float && number.getFirstElement() instanceof Float) {
            Float first = (Float) getFirstElement() * (Float) number.getFirstElement();
            Float second = (Float) getSecondElement() * (Float) number.getSecondElement();
            if (function == 0) {
                setFirst(first);
                setSecond(second);
                reduce();
                return null;
            }
            Fraction answer = Fraction.createFraction(first, second);
            answer.reduce();
            return answer;
        } else if (getFirstElement() instanceof Double && number.getFirstElement() instanceof Double) {
            Double first = (Double) getFirstElement() * (Double) number.getFirstElement();
            Double second = (Double) getSecondElement() * (Double) number.getSecondElement();
            if (function == 0) {
                setFirst(first);
                setSecond(second);
                reduce();
                return null;
            }
            Fraction answer = Fraction.createFraction(first, second);
            answer.reduce();
            return answer;
        } else {
            throw new UnsupportedOperationException();
        }
    }
}

class Pair<T, T1> implements Cloneable {

    private T first;
    private T1 second;

    Pair(T obj, T1 obj1) {
        first = obj;
        second = obj1;
    }

    protected static <T, T1> Pair<T, T1> createPair(T element, T1 element1) {
        return new Pair<>(element, element1);
    }

    protected T getFirstElement() {
        return first;
    }

    protected T1 getSecondElement() {
        return second;
    }

    protected void setFirst(T element) {
        first = element;
    }

    protected void setSecond(T1 element) {
        second = element;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Pair)) {
            return false;
        }
        Pair pair = (Pair) obj;
        return first.equals(pair.first) && second.equals(pair.second);
    }

    @Override
    public int hashCode() {
        int hashCode = 1;
        hashCode = 31 * hashCode + (first == null ? 0 : first.hashCode());
        return 31 * hashCode + (second == null ? 0 : second.hashCode());
    }

    @Override
    public Object clone() {
        return Pair.createPair(first, second);
    }
}

class Graph {

    private int[][] base;
    private boolean[] used;
    private int quantity;
    private Integer[] ancestor;

    public int[][] getBase() {
        return base.clone();
    }

    public boolean[] getUsed() {
        return used.clone();
    }

    public int getQuantity() {
        return quantity;
    }

    public Integer[] getAncestor() {
        return ancestor.clone();
    }

    public void setBase(int[][] base) {
        this.base = base;
    }

    protected void start(int length) {
        used = new boolean[length];
        ancestor = new Integer[length];
        Arrays.fill(ancestor, -1);
        quantity = 0;
    }

    protected void edgesMatrixToDefault(int length, int quantity, boolean readConsole, int[][] value) throws Exception {
        base = new int[length][];
        List<ArrayList<Integer>> inputBase = new ArrayList<>();
        for (int i = 0; i < length; i++) {
            inputBase.add(new ArrayList<>());
        }
        for (int i = 0; i < quantity; i++) {
            int[] input = readConsole ? IO.readArrayInt(" ") : value[i];
            inputBase.get(input[0] - 1).add(input[1] - 1);
            //inputBase.get(input[0] - 1).add(input[2]); // price
            inputBase.get(input[1] - 1).add(input[0] - 1);
            //inputBase.get(input[1] - 1).add(input[2]); // price
        }
        for (int i = 0; i < length; i++) {
            base[i] = inputBase.get(i).stream().mapToInt(Integer::intValue).toArray();
        }
        start(length);
    }

    protected void adjacencyMatrixToDefault(int length, int not, boolean readConsole, int[][] value) throws Exception {
        this.base = new int[length][];
        List<Integer> buffer = new ArrayList<>();
        for (int i = 0; i < length; i++) {
            int[] InputArray = readConsole ? IO.readArrayInt(" ") : value[i];
            for (int index = 0; index < length; index++) {
                if (i != index && InputArray[index] != not) {
                    buffer.add(index);
                    // buffer.add(InputArray[index]); // price
                }
            }
            this.base[i] = buffer.stream().mapToInt(Integer::intValue).toArray();
            buffer.clear();
        }
        start(length);
    }

    protected void dfs(int position) throws Exception {
        used[position] = true;
        quantity++;
        int next;
        for (int index = 0; index < base[position].length; index++) {
            next = base[position][index];
            if (!used[next]) {
                ancestor[next] = position;
                dfs(next);
            } /*else {
                if (next != ancestor[position]) { // if cycle
                    throw new Exception();
                }
            }*/
        }
    }

    protected int dijkstra(int start, int stop, int size) {
        start--;
        stop--;
        int[] dist = new int[size];
        for (int i = 0; i < size; i++) {
            if (i != start) {
                dist[i] = Integer.MAX_VALUE;
            }
            ancestor[i] = start;
        }

        Queue<int[]> queue = new PriorityQueue<>(Comparator.comparingInt((int[] ints) -> ints[1]));
        queue.add(new int[]{start, 0});
        int position;
        int[] getQueue;
        while (queue.size() != 0) {
            getQueue = queue.poll();
            position = getQueue[0];
            if (getQueue[1] > dist[position]) {
                continue;
            }
            for (int index = 0; index < this.base[position].length; index += 2) {
                if (dist[position] + this.base[position][index + 1] < dist[this.base[position][index]] && !this.used[this.base[position][index]]) {
                    dist[this.base[position][index]] = dist[position] + this.base[position][index + 1];
                    this.ancestor[this.base[position][index]] = position;
                    queue.add(new int[]{this.base[position][index], dist[this.base[position][index]]});
                }
            }
            used[position] = true;
        }
        return dist[stop] == Integer.MAX_VALUE ? -1 : dist[stop];
    }

    protected static boolean solveFloydWarshall(int[][] base, int length, int not) {
        for (int k = 0; k < length; k++) {
            for (int i = 0; i < length; i++) {
                for (int j = 0; j < length; j++) {
                    if (base[i][k] == not || base[k][j] == not) {
                        continue;
                    }
                    int total = base[i][k] + base[k][j];
                    if (base[i][j] != not) {
                        base[i][j] = Math.min(base[i][j], total);
                    } else {
                        base[i][j] = total;
                    }
                }
            }
        }
        for (int index = 0; index < length; index++) {
            if (base[index][index] != 0) { // if cycle
                return false;
            }
        }
        return true;
    }

    protected static Pair<Long, int[][]> solveKruskal(int[][] edgesMatrix, final int countVertex, final int indexSort) {
        int[][] answer = new int[countVertex - 1][2];
        long sum = 0;
        Arrays.sort(edgesMatrix, Comparator.comparingInt(value -> value[indexSort]));
        SystemOfDisjointSets dsu = new SystemOfDisjointSets(countVertex);
        for (int i = 0; i < countVertex; i++) {
            dsu.makeSet(i);
        }
        int index = 0;
        for (int[] value : edgesMatrix) {
            if (dsu.mergeSets(value[0], value[1])) {
                sum += value[indexSort];
                answer[index] = new int[]{value[0], value[1]};
                index++;
            }
        }
        if (index < countVertex - 1) {
            return Pair.createPair(null, null);
        }
        return Pair.createPair(sum, answer);
    }

    static class SegmentTree {

        private int[] segmentArray;
        private BiFunction<Integer, Integer, Integer> function;

        protected void setSegmentArray(int[] segmentArray) {
            this.segmentArray = segmentArray;
        }

        protected int[] getSegmentArray() {
            return segmentArray.clone();
        }

        protected void setFunction(BiFunction<Integer, Integer, Integer> function) {
            this.function = function;
        }

        protected BiFunction<Integer, Integer, Integer> getFunction() {
            return function;
        }

        SegmentTree() {

        }

        SegmentTree(int[] startBase, int neutral, BiFunction<Integer, Integer, Integer> function) {
            this.function = function;
            int length = startBase.length;
            int[] base;
            if ((length & (length - 1)) != 0) {
                int pow = 0;
                while (length > 0) {
                    length >>= 1;
                    pow++;
                }
                pow--;
                base = new int[2 << pow];
                System.arraycopy(startBase, 0, base, 0, startBase.length);
                Arrays.fill(base, startBase.length, base.length, neutral);

            } else {
                base = startBase;
            }
            segmentArray = new int[base.length << 1]; // maybe * 4
            Arrays.fill(segmentArray, neutral);
            inDepth(base, 1, 0, base.length - 1);
        }

        private void inDepth(int[] base, int position, int low, int high) {
            if (low == high) {
                segmentArray[position] = base[low];
            } else {
                int mid = (low + high) >> 1;
                inDepth(base, position << 1, low, mid);
                inDepth(base, (position << 1) + 1, mid + 1, high);
                segmentArray[position] = function.apply(segmentArray[position << 1], segmentArray[(position << 1) + 1]);
            }
        }

        protected int getValue(int left, int right, int neutral) {
            return findValue(1, 0, ((segmentArray.length) >> 1) - 1, left, right, neutral);
        }

        private int findValue(int position, int low, int high, int left, int right, int neutral) {
            if (left > right) {
                return neutral;
            }
            if (left == low && right == high) {
                return segmentArray[position];
            }
            int mid = (low + high) >> 1;
            return function.apply(findValue(position << 1, low, mid, left, Math.min(right, mid), neutral),
                    findValue((position << 1) + 1, mid + 1, high, Math.max(left, mid + 1), right, neutral));
        }

        protected void replaceValue(int index, int value) {
            update(1, 0, (segmentArray.length >> 1) - 1, index, value);
        }

        private void update(int position, int low, int high, int index, int value) {
            if (low == high) {
                segmentArray[position] = value;
            } else {
                int mid = (low + high) >> 1;
                if (index <= mid) {
                    update(position << 1, low, mid, index, value);
                } else {
                    update((position << 1) + 1, mid + 1, high, index, value);
                }
                segmentArray[position] = function.apply(segmentArray[position << 1], segmentArray[(position << 1) + 1]);
            }
        }
    }

    static class SegmentTreeGeneric<T> {

        private Object[] segmentArray;
        private BiFunction<T, T, T> function;

        protected void setSegmentArray(T[] segmentArray) {
            this.segmentArray = segmentArray;
        }

        protected Object getSegmentArray() {
            return segmentArray.clone();
        }

        protected void setFunction(BiFunction<T, T, T> function) {
            this.function = function;
        }

        protected BiFunction<T, T, T> getFunction() {
            return function;
        }

        SegmentTreeGeneric() {

        }

        SegmentTreeGeneric(T[] startBase, T neutral, BiFunction<T, T, T> function) {
            this.function = function;
            int length = startBase.length;
            Object[] base;
            if ((length & (length - 1)) != 0) {
                int pow = 0;
                while (length > 0) {
                    length >>= 1;
                    pow++;
                }
                pow--;
                base = new Object[2 << pow];
                System.arraycopy(startBase, 0, base, 0, startBase.length);
                Arrays.fill(base, startBase.length, base.length, neutral);

            } else {
                base = startBase;
            }
            segmentArray = new Object[base.length << 1]; // maybe * 4
            Arrays.fill(segmentArray, neutral);
            inDepth(base, 1, 0, base.length - 1);
        }

        private void inDepth(Object[] base, int position, int low, int high) {
            if (low == high) {
                segmentArray[position] = base[low];
            } else {
                int mid = (low + high) >> 1;
                inDepth(base, position << 1, low, mid);
                inDepth(base, (position << 1) + 1, mid + 1, high);
                segmentArray[position] = function.apply((T) segmentArray[position << 1], (T) segmentArray[(position << 1) + 1]);
            }
        }

        protected T getValue(int left, int right, T neutral) {
            return findValue(1, 0, ((segmentArray.length) >> 1) - 1, left, right, neutral);
        }

        private T findValue(int position, int low, int high, int left, int right, T neutral) {
            if (left > right) {
                return neutral;
            }
            if (left == low && right == high) {
                return (T) segmentArray[position];
            }
            int mid = (low + high) >> 1;
            return function.apply(findValue(position << 1, low, mid, left, Math.min(right, mid), neutral),
                    findValue((position << 1) + 1, mid + 1, high, Math.max(left, mid + 1), right, neutral));
        }

        protected void replaceValue(int index, T value) {
            update(1, 0, (segmentArray.length >> 1) - 1, index, value);
        }

        private void update(int position, int low, int high, int index, T value) {
            if (low == high) {
                segmentArray[position] = value;
            } else {
                int mid = (low + high) >> 1;
                if (index <= mid) {
                    update(position << 1, low, mid, index, value);
                } else {
                    update((position << 1) + 1, mid + 1, high, index, value);
                }
                segmentArray[position] = function.apply((T) segmentArray[position << 1], (T) segmentArray[(position << 1) + 1]);
            }
        }
    }
}

class SystemOfDisjointSets {

    private int[] rank;
    private int[] ancestor;

    SystemOfDisjointSets(int size) {
        this.rank = new int[size];
        this.ancestor = new int[size];
    }

    protected void makeSet(int value) {
        ancestor[value] = value;
        rank[value] = 0;
    }

    protected int findSet(int value) {
        if (value == ancestor[value]) {
            return value;
        }
        return ancestor[value] = findSet(ancestor[value]);
    }

    protected boolean mergeSets(int first, int second) {
        first = findSet(first);
        second = findSet(second);
        if (first != second) {
            if (rank[first] < rank[second]) {
                int number = first;
                first = second;
                second = number;
            }
            ancestor[second] = first;
            if (rank[first] == rank[second]) {
                rank[first]++;
            }
            return true;
        }
        return false;
    }
}

interface Array {
    void useArray(int[] a);
}

interface Method {
    void use();
}

class FastSort {

    protected static int[] sort(int[] array, int ShellHeapMergeMyInsertionSort) {
        sort(array, ShellHeapMergeMyInsertionSort, array.length);
        return array;
    }

    protected static int[] sortClone(int[] array, int ShellHeapMergeMyInsertionSort) {
        int[] base = array.clone();
        sort(base, ShellHeapMergeMyInsertionSort, array.length);
        return base;
    }

    private static void sort(int[] array, int ShellHeapMergeMyInsertionSort, int length) {
        if (ShellHeapMergeMyInsertionSort < 0 || ShellHeapMergeMyInsertionSort > 4) {
            Random random = new Random();
            ShellHeapMergeMyInsertionSort = random.nextInt(4);
        }
        if (ShellHeapMergeMyInsertionSort == 0) {
            ShellSort(array);
        } else if (ShellHeapMergeMyInsertionSort == 1) {
            HeapSort(array);
        } else if (ShellHeapMergeMyInsertionSort == 2) {
            MergeSort(array, 0, length - 1);
        } else if (ShellHeapMergeMyInsertionSort == 3) {
            straightMergeSort(array, length);
        } else if (ShellHeapMergeMyInsertionSort == 4) {
            insertionSort(array);
        }
    }

    private static void straightMergeSort(int[] array, int size) {
        if (size == 0) {
            return;
        }
        int length = (size >> 1) + ((size % 2) == 0 ? 0 : 1);
        Integer[][] ZeroBuffer = new Integer[length + length % 2][2];
        Integer[][] FirstBuffer = new Integer[0][0];
        for (int index = 0; index < length; index++) {
            int ArrayIndex = index << 1;
            int NextArrayIndex = (index << 1) + 1;
            if (NextArrayIndex < size) {
                if (array[ArrayIndex] > array[NextArrayIndex]) {
                    ZeroBuffer[index][0] = array[NextArrayIndex];
                    ZeroBuffer[index][1] = array[ArrayIndex];
                } else {
                    ZeroBuffer[index][0] = array[ArrayIndex];
                    ZeroBuffer[index][1] = array[NextArrayIndex];
                }
            } else {
                ZeroBuffer[index][0] = array[ArrayIndex];
            }
        }
        boolean position = false;
        int pointer0, pointer, pointer1, number = 4, NewPointer, count;
        Integer[][] NewBuffer;
        Integer[][] OldBuffer;
        length = (size >> 2) + ((size % 4) == 0 ? 0 : 1);
        while (true) {
            pointer0 = 0;
            count = (number >> 1) - 1;
            if (!position) {
                FirstBuffer = new Integer[length + length % 2][number];
                NewBuffer = FirstBuffer;
                OldBuffer = ZeroBuffer;
            } else {
                ZeroBuffer = new Integer[length + length % 2][number];
                NewBuffer = ZeroBuffer;
                OldBuffer = FirstBuffer;
            }
            for (int i = 0; i < length; i++) {
                pointer = 0;
                pointer1 = 0;
                NewPointer = pointer0 + 1;
                if (length == 1) {
                    for (int g = 0; g < size; g++) {
                        if (pointer > count || OldBuffer[pointer0][pointer] == null) {
                            array[g] = OldBuffer[NewPointer][pointer1];
                            pointer1++;
                        } else if (pointer1 > count || OldBuffer[NewPointer][pointer1] == null) {
                            if (OldBuffer[pointer0][pointer] == null) {
                                continue;
                            }
                            array[g] = OldBuffer[pointer0][pointer];
                            pointer++;
                        } else if (OldBuffer[pointer0][pointer] >= OldBuffer[NewPointer][pointer1]) {
                            array[g] = OldBuffer[NewPointer][pointer1];
                            pointer1++;
                        } else {
                            array[g] = OldBuffer[pointer0][pointer];
                            pointer++;
                        }
                    }
                    return;
                }
                for (int g = 0; g < number; g++) {
                    if (pointer > count || OldBuffer[pointer0][pointer] == null) {
                        if (OldBuffer[NewPointer][pointer1] == null) {
                            continue;
                        }
                        NewBuffer[i][g] = OldBuffer[NewPointer][pointer1];
                        pointer1++;
                    } else if (pointer1 > count || OldBuffer[NewPointer][pointer1] == null) {
                        if (OldBuffer[pointer0][pointer] == null) {
                            continue;
                        }
                        NewBuffer[i][g] = OldBuffer[pointer0][pointer];
                        pointer++;
                    } else if (OldBuffer[pointer0][pointer] >= OldBuffer[NewPointer][pointer1]) {
                        NewBuffer[i][g] = OldBuffer[NewPointer][pointer1];
                        pointer1++;
                    } else {
                        NewBuffer[i][g] = OldBuffer[pointer0][pointer];
                        pointer++;
                    }
                }
                pointer0 += 2;
            }
            position = !position;
            length = (length >> 1) + length % 2;
            number <<= 1;
        }
    }

    private static void ShellSort(int[] array) {
        int j;
        for (int gap = (array.length >> 1); gap > 0; gap >>= 1) {
            for (int i = gap; i < array.length; i++) {
                int temp = array[i];
                for (j = i; j >= gap && array[j - gap] > temp; j -= gap) {
                    array[j] = array[j - gap];
                }
                array[j] = temp;
            }
        }
    }

    private static void HeapSort(int[] array) {
        for (int i = (array.length >> 1) - 1; i >= 0; i--)
            shiftDown(array, i, array.length);
        for (int i = array.length - 1; i > 0; i--) {
            swap(array, 0, i);
            shiftDown(array, 0, i);
        }
    }

    private static void shiftDown(int[] array, int i, int n) {
        int child;
        int tmp;
        for (tmp = array[i]; leftChild(i) < n; i = child) {
            child = leftChild(i);
            if (child != n - 1 && (array[child] < array[child + 1]))
                child++;
            if (tmp < array[child])
                array[i] = array[child];
            else
                break;
        }
        array[i] = tmp;
    }

    private static int leftChild(int i) {
        return (i << 1) + 1;
    }

    private static void swap(int[] array, int i, int j) {
        int temp = array[i];
        array[i] = array[j];
        array[j] = temp;
    }

    private static void MergeSort(int[] array, int low, int high) {
        if (low < high) {
            int mid = (low + high) >> 1;
            MergeSort(array, low, mid);
            MergeSort(array, mid + 1, high);
            merge(array, low, mid, high);
        }
    }

    private static void merge(int[] array, int low, int mid, int high) {
        int n = high - low + 1;
        int[] Temp = new int[n];
        int i = low, j = mid + 1;
        int k = 0;
        while (i <= mid || j <= high) {
            if (i > mid)
                Temp[k++] = array[j++];
            else if (j > high)
                Temp[k++] = array[i++];
            else if (array[i] < array[j])
                Temp[k++] = array[i++];
            else
                Temp[k++] = array[j++];
        }
        for (j = 0; j < n; j++)
            array[low + j] = Temp[j];
    }

    private static void insertionSort(int[] elements) {
        for (int i = 1; i < elements.length; i++) {
            int key = elements[i];
            int j = i - 1;
            while (j >= 0 && key < elements[j]) {
                elements[j + 1] = elements[j];
                j--;
            }
            elements[j + 1] = key;
        }
    }
}

class IO {

    private static BufferedReader read;
    private static boolean fileInput = false;
    private static BufferedWriter write;
    private static boolean fileOutput = false;

    public static void setFileInput(boolean fileInput) {
        IO.fileInput = fileInput;
    }

    public static void setFileOutput(boolean fileOutput) {
        IO.fileOutput = fileOutput;
    }

    private static void startInput() {
        try {
            read = new BufferedReader(fileInput ? new FileReader("input.txt") : new InputStreamReader(System.in));
        } catch (Exception error) {
        }
    }

    private static void startOutput() {
        try {
            write = new BufferedWriter(fileOutput ? new FileWriter("output.txt") : new OutputStreamWriter(System.out));
        } catch (Exception error) {
        }
    }

    protected static int readInt() throws Exception {
        if (read == null) {
            startInput();
        }
        return Integer.parseInt(read.readLine());
    }

    protected static long readLong() throws Exception {
        if (read == null) {
            startInput();
        }
        return Long.parseLong(read.readLine());
    }

    protected static String readString() throws Exception {
        if (read == null) {
            startInput();
        }
        return read.readLine();
    }

    protected static int[] readArrayInt(String split) throws Exception {
        if (read == null) {
            startInput();
        }
        return Arrays.stream(read.readLine().split(split)).mapToInt(Integer::parseInt).toArray();
    }

    protected static long[] readArrayLong(String split) throws Exception {
        if (read == null) {
            startInput();
        }
        return Arrays.stream(read.readLine().split(split)).mapToLong(Long::parseLong).toArray();
    }

    protected static String[] readArrayString(String split) throws Exception {
        if (read == null) {
            startInput();
        }
        return read.readLine().split(split);
    }

    protected static void writeArray(int[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(Integer.toString(array[index]));
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception error) {
        }
    }

    protected static void writeArray(Integer[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(Integer.toString(array[index]));
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception error) {
        }
    }

    protected static void writeArray(Int[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(Integer.toString(array[index].value));
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception error) {
        }
    }

    protected static void writeArray(long[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(Long.toString(array[index]));
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception error) {
        }
    }

    protected static void writeArray(Long[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(Long.toString(array[index]));
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception error) {
        }
    }

    public static void writeArray(String[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(array[index]);
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception ignored) {
        }
    }

    protected static void writeArray(boolean[] array, String split, boolean enter) {
        if (write == null) {
            startOutput();
        }
        try {
            int length = array.length;
            for (int index = 0; index < length; index++) {
                write.write(Boolean.toString(array[index]));
                if (index + 1 != length) {
                    write.write(split);
                }
            }
            if (enter) {
                writeEnter();
            }
        } catch (Exception ignored) {
        }
    }

    protected static void writeInt(int number, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(Integer.toString(number));
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeInt(Integer number, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(Integer.toString(number));
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeLong(long number, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(Long.toString(number));
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeLong(Long number, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(Long.toString(number));
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeString(String word, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(word);
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeBoolean(boolean value, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(value ? "true" : "false");
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeBoolean(Boolean value, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(value ? "true" : "false");
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeChar(char word, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(word);
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeChar(Character word, String end) {
        if (write == null) {
            startOutput();
        }
        try {
            write.write(word);
            write.write(end);
        } catch (Exception ignored) {
        }
    }

    protected static void writeEnter() {
        if (write == null) {
            startOutput();
        }
        try {
            write.newLine();
        } catch (Exception ignored) {
        }
    }

    protected static void print(boolean exit) throws Exception {
        if (exit) {
            print();
        } else {
            write.flush();
        }
    }

    protected static void print() throws Exception {
        if (write == null) {
            return;
        }
        write.flush();
        if (read != null) {
            read.close();
        }
        write.close();
    }
}


	import java.util.*;

import java.io.*;
	import java.math.*;
	import java.awt.geom.*;

	import static java.lang.Math.*;

	public class Solution implements Runnable {

	    public void solve() throws Exception {

	    	int t=sc.nextInt();
	    	long mod=(long)1e9+7;

	    	while(t-->0)
	    	{
	    		int n=sc.nextInt();
	    		int m=sc.nextInt();
	    		if(m<=n)
	    		{
	    			out.println("YES");
	    			continue;
	    		}
	    		int temp=Integer.MAX_VALUE;
	    		boolean flag=false;

	    		for(int i=1;i<(int)1e9;i++)
	    		{
	    			//out.println(temp);
	    			if(i+(int)Math.ceil((double)m/((double)i+1))<temp)
	    			{
	    				temp=i+(int)Math.ceil((double)m/(double)(i+1));

	    			if(temp<=n)
	    			{
	    			  out.println("YES");
	    			  flag=true;
	    			  break;
	    			}
	    			}
	    			else break;

	    		}
	    		if(!flag)
	    		{
	    			out.println("NO");
	    		}
	    	}
	    }

	    static long power(long x, long y, long p)
	    {

	        long res = 1;

	        x = x % p;

	       if (x == 0) return 0;

	        while (y > 0)
	        {
	            if((y & 1)==1)
	                res = (res * x) % p;
	            y = y >> 1;
	            x = (x * x) % p;
	        }
	        return res;
	    }

	    static Throwable uncaught;

	    BufferedReader in;
	    FastScanner sc;
	    PrintWriter out;

	    @Override
	    public void run() {
	        try {
	            in = new BufferedReader(new InputStreamReader(System.in));
	            out = new PrintWriter(System.out);
	            sc = new FastScanner(in);
	            solve();
	        } catch (Throwable uncaught) {
	            Solution.uncaught = uncaught;
	        } finally {
	            out.close();
	        }
	    }

	    public static void main(String[] args) throws Throwable {
	        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
	        thread.start();
	        thread.join();
	        if (Solution.uncaught != null) {
	            throw Solution.uncaught;
	        }
	    }

	}

	class FastScanner {

	    BufferedReader in;
	    StringTokenizer st;

	    public FastScanner(BufferedReader in) {
	        this.in = in;
	    }

	    public String nextToken() throws Exception {
	        while (st == null || !st.hasMoreTokens()) {
	            st = new StringTokenizer(in.readLine());
	        }
	        return st.nextToken();
	    }

	    public int nextInt() throws Exception {
	        return Integer.parseInt(nextToken());
	    }

	    public int[] readArray(int n) throws Exception {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}

	    public long nextLong() throws Exception {
	        return Long.parseLong(nextToken());
	    }

	    public double nextDouble() throws Exception {
	        return Double.parseDouble(nextToken());
	    }

	}


	import java.util.*;

import java.io.*;
	import java.math.*;
	import java.awt.geom.*;

	import static java.lang.Math.*;

	public class Solution implements Runnable {

	    public void solve() throws Exception {

	    	int t=sc.nextInt();
	    	long mod=(long)1e9+7;

	    	while(t-->0)
	    	{
	    		int n=sc.nextInt();
	    		int m=sc.nextInt();
	    		if(m<=n)
	    		{
	    			out.println("YES");
	    			continue;
	    		}
	    		int temp=Integer.MAX_VALUE;
	    		boolean flag=false;

	    		for(int i=1;i<(int)1e9;i++)
	    		{
	    			//out.println(temp);
	    			if(i+(int)Math.ceil((double)m/((double)i+1))<=temp)
	    			{
	    				temp=i+(int)Math.ceil((double)m/(double)(i+1));

	    			if(temp<=n)
	    			{
	    			  out.println("YES");
	    			  flag=true;
	    			  break;
	    			}
	    			}
	    			else break;

	    		}
	    		if(!flag)
	    		{
	    			out.println("NO");
	    		}
	    	}
	    }

	    static long power(long x, long y, long p)
	    {

	        long res = 1;

	        x = x % p;

	       if (x == 0) return 0;

	        while (y > 0)
	        {
	            if((y & 1)==1)
	                res = (res * x) % p;
	            y = y >> 1;
	            x = (x * x) % p;
	        }
	        return res;
	    }

	    static Throwable uncaught;

	    BufferedReader in;
	    FastScanner sc;
	    PrintWriter out;

	    @Override
	    public void run() {
	        try {
	            in = new BufferedReader(new InputStreamReader(System.in));
	            out = new PrintWriter(System.out);
	            sc = new FastScanner(in);
	            solve();
	        } catch (Throwable uncaught) {
	            Solution.uncaught = uncaught;
	        } finally {
	            out.close();
	        }
	    }

	    public static void main(String[] args) throws Throwable {
	        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
	        thread.start();
	        thread.join();
	        if (Solution.uncaught != null) {
	            throw Solution.uncaught;
	        }
	    }

	}

	class FastScanner {

	    BufferedReader in;
	    StringTokenizer st;

	    public FastScanner(BufferedReader in) {
	        this.in = in;
	    }

	    public String nextToken() throws Exception {
	        while (st == null || !st.hasMoreTokens()) {
	            st = new StringTokenizer(in.readLine());
	        }
	        return st.nextToken();
	    }

	    public int nextInt() throws Exception {
	        return Integer.parseInt(nextToken());
	    }

	    public int[] readArray(int n) throws Exception {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}

	    public long nextLong() throws Exception {
	        return Long.parseLong(nextToken());
	    }

	    public double nextDouble() throws Exception {
	        return Double.parseDouble(nextToken());
	    }

	}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ADeadline solver = new ADeadline();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADeadline {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                int n = in.nextInt();
                int d = in.nextInt();
                if (d <= n) {
                    out.println("YES");
                    continue;
                }
                int k = d / 2;
                if (k + (d + k) / (k + 1) <= n || (k + 1) + (d + k + 1) / (k + 2) <= n) {
                    out.println("YES");
                } else {
                    out.println("NO");
                }
//            if(binarySearch(d,n)){
//                out.println("YES");
//                continue;
//            }
//            out.println("NO");
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; ++i) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ADeadline solver = new ADeadline();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADeadline {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                int n = in.nextInt();
                int d = in.nextInt();
                if (d <= n) {
                    out.println("YES");
                    continue;
                }
                if (binarySearch(d, n)) {
                    out.println("YES");
                    continue;
                }
                out.println("NO");
            }
        }

        boolean binarySearch(int d, int n) {
            int l = 0;
            int r = d;
            int ans = -1;
            while (l <= r) {
                int mid = l + (r - l + 1) / 2;
                if (!works(mid, d, n)) {
                    r = mid - 1;
                } else {
                    l = mid + 1;
                    ans = mid;
                }
            }
            if (ans != -1) {
                return true;
            }
            ;
            return false;
        }

        boolean works(int mid, int d, int n) {
            if (mid + (int) Math.ceil(d / (double) (mid + 1)) <= n) {
                return true;
            }
            return false;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; ++i) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ADeadline solver = new ADeadline();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADeadline {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                int n = in.nextInt();
                int d = in.nextInt();
                if (d <= n) {
                    out.println("YES");
                    continue;
                }
                if (binarySearch(d, n)) {
                    out.println("YES");
                    continue;
                }
                out.println("NO");
            }
        }

        boolean binarySearch(int d, int n) {
            int l = 0;
            int r = d;
            int ans = -1;
            while (l <= r) {
                int mid = l + (r - l + 1) / 2;
                if (!works(mid, d, n)) {
                    r = mid - 1;
                } else {
                    l = mid + 1;
                    ans = mid;
                }
            }
            if (ans != -1) {
                return true;
            }
            ;
            return false;
        }

        boolean works(int mid, int d, int n) {
            if (mid + ((d + mid) / (mid + 1)) <= n) {
                return true;
            }
            return false;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; ++i) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ADeadline solver = new ADeadline();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADeadline {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                int n = in.nextInt();
                int d = in.nextInt();
                if (d <= n) {
                    out.println("YES");
                    continue;
                }
                if (binarySearch(d, n)) {
                    out.println("YES");
                    continue;
                }
                out.println("NO");
            }
        }

        boolean binarySearch(int d, int n) {
            int l = 0;
            int r = d;
            int ans = -1;
            while (l <= r) {
                int mid = l + (r - l + 1) / 2;
                if (!works(mid, d, n)) {
                    r = mid - 1;
                } else {
                    l = mid + 1;
                    ans = mid;
                }
            }
            if (ans != -1) {
                return true;
            }
            ;
            return false;
        }

        boolean works(int mid, int d, int n) {
            if (mid + (int) (Math.ceil((0.5) + (d / (double) (mid + 1)))) <= n) {
                return true;
            }
            return false;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; ++i) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ADeadline solver = new ADeadline();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADeadline {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                int n = in.nextInt();
                int d = in.nextInt();
                boolean ok = false;
                for (int i = 0; i * i - 10 < d; i++) {
                    if (i + (d + i) / (i + 1) <= n) {
                        ok = true;
                        break;
                    }
                }
                if (ok) {
                    out.println("YES");
                } else {
                    out.println("NO");
                }
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; ++i) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author unknown
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ADeadline solver = new ADeadline();
        solver.solve(1, in, out);
        out.close();
    }

    static class ADeadline {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int ntc = in.nextInt();
            while ((ntc--) > 0) {
                int n = in.nextInt();
                int d = in.nextInt();
                if (d <= n) {
                    out.println("YES");
                    continue;
                }
                int k = d / 2;
                if (k + (Math.ceil(d / (double) (k + 1))) <= n) {
                    out.println("YES");
                } else {
                    out.println("NO");
                }
//            if(binarySearch(d,n)){
//                out.println("YES");
//                continue;
//            }
//            out.println("NO");
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; ++i) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }
}


import java.util.*;

public class deadline
{
	public static void main (String args[])
	{
		Scanner scan = new Scanner(System.in);
		int cases = scan.nextInt();

		for (int i = 0; i<cases; i++)
		{
			boolean N = false;
			double prevOpt = 0;
			double n = scan.nextInt();
			double d = scan.nextInt();

			if (d <= n)
				N = true;
			else
			{
				for (int j = 1; j<d/2; j++)
				{
					double optimize = (Math.ceil(d/(j+1)));
					if (prevOpt == optimize)
						break;
					else if ((optimize + j) <= n)
					{
						N = true;
						break;
					}
					prevOpt = optimize;
				}
			}
			if (N)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
}


import java.util.*;

public class deadline
{
	public static void main (String args[])
	{
		Scanner scan = new Scanner(System.in);
		int cases = scan.nextInt();

		for (int i = 0; i<cases; i++)
		{
			boolean N = false;
			double n = scan.nextInt();
			double d = scan.nextInt();

			if (d <= n)
				N = true;
			else
			{
				for (int j = 1; j<d/2; j++)
				{
					double optimize = (Math.ceil(d/(j+1)));
					if ((optimize + j) <= n)
					{
						N = true;
					}
				}
			}
			if (N)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
}


import java.util.*;

public class deadline
{
	public static void main (String args[])
	{
		Scanner scan = new Scanner(System.in);
		int cases = scan.nextInt();

		for (int i = 0; i<cases; i++)
		{
			boolean N = false;
			double n = scan.nextInt();
			double d = scan.nextInt();

			if (d <= n)
				N = true;
			else
			{
				for (int j = 1; j<d/2; j++)
				{
					double optimize = (Math.ceil(d/(j+1)));
					if ((optimize + j) <= n)
					{
						N = true;
						break;
					}
				}
			}
			if (N)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
}


import java.util.*;

public class deadline
{
	public static void main (String args[])
	{
		Scanner scan = new Scanner(System.in);
		int cases = scan.nextInt();

		for (int i = 0; i<cases; i++)
		{
			boolean N = false;
			double n = scan.nextInt();
			double d = scan.nextInt();

			if (d <= n)
				N = true;
			else
			{
				for (int j = 1; j<d; j++)
				{
					double optimize = (Math.ceil(d/(j+1)));
					if ((optimize + j) <= n)
					{
						N = true;
					}
				}
			}
			if (N)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
}


//package pkg1288a;
import static java.lang.Math.sqrt;
import java.util.*;
import java.math.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        for(int i=0;i<t;i++)
        {
            long n=sc.nextInt();
            long d=sc.nextInt();
            double temp=((n-1)*(n-1) - 4*(d-n));
            float fact1=(float)((n-1) + sqrt(temp))/2;
            float fact2=(float)((n-1) - sqrt(temp))/2;
            float ans1=(float)fact1*fact1 + (1-n)*fact1 + d -n;
            float ans2=(float)fact2*fact2 + (1-n)*fact2 + d -n;
            if(ans1 >=0 || ans2>=0 )
            {
                System.out.println("YES");
            }
            else
            {
                System.out.println("NO");
            }
        }
    }

}


//package pkg1288a;
import static java.lang.Math.sqrt;
import java.util.*;
import java.math.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        for(int i=0;i<t;i++)
        {
            int n=sc.nextInt();
            int d=sc.nextInt();
            int temp=((n-1)*(n-1) - 4*(d-n));
            double fact1=((n-1) + sqrt(temp))/2;
            double fact2=((n-1) - sqrt(temp))/2;
            double ans1=fact1*fact1 + (1-n)*fact1 + d -n;
            double ans2=fact2*fact2 + (1-n)*fact2 + d -n;
            if(ans1 >=0 || ans2>=0 )
            {
                System.out.println("YES");
            }
            else
            {
                System.out.println("NO");
            }
        }
    }

}


//package pkg1288a;
import static java.lang.Math.sqrt;
import java.util.*;
import java.math.*;
public class Main
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        for(int i=0;i<t;i++)
        {
            long n=sc.nextInt();
            long d=sc.nextInt();
            if(((1-n)*(1-n) -4*(d-n))>=0)
            {
                System.out.println("YES");
            }
            else
            {
                System.out.println("NO");
            }
        }
    }

}


import java.io.*;
public class PA_ED80 {
    public static void main(String[] args) throws IOException{
        BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(in.readLine());
        String inp[];
        int n,d;
        boolean flag=true;
        for(int test=0;test<t;test++){
            flag=true;
            inp=in.readLine().split(" ");
            n=Integer.parseInt(inp[0]);
            d=Integer.parseInt(inp[1]);
            double da=d;
            if(d<=n){System.out.println("YES");}
            else{
                for(int i=1;i<=Math.min(Math.sqrt(d)+10,100010);i++){
                    if(i+Math.ceil(da/(i+1))<=n){
                        System.out.println("YES");
                        flag=false;
                        break;
                    }
                }
                if(flag)System.out.println("NO");
            }
        }
    }
}


import java.io.*;
public class PA_ED80 {
    public static void main(String[] args) throws IOException{
        BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(in.readLine());
        String inp[];
        int n,d;
        boolean flag=true;
        for(int test=0;test<t;test++){
            flag=true;
            inp=in.readLine().split(" ");
            n=Integer.parseInt(inp[0]);
            d=Integer.parseInt(inp[1]);
            double da=d;
            if(d<=n){System.out.println("YES");}
            else{
                for(int i=1;i<=d;){
                    if(i+Math.ceil(da/(i+1))<=n){
                        System.out.println("YES");
                        flag=false;
                        break;
                    }
                    i=d/(int)Math.ceil(da/(i+1));
                    if(i==1)break;
                }
                if(flag)System.out.println("NO");
            }
        }
    }
}


import java.io.*;
public class PA_ED80 {
    public static void main(String[] args) throws IOException{
        BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(in.readLine());
        String inp[];
        long n,d;
        boolean flag=true;
        for(int test=0;test<t;test++){
            flag=true;
            inp=in.readLine().split(" ");
            n=Integer.parseInt(inp[0]);
            d=Integer.parseInt(inp[1]);
            if(d<=n){System.out.println("YES");}
            else{
                for(int i=1;i<=d;i++){
                    if(i+Math.ceil(d/(i+1))<n){
                        System.out.println("YES");
                        flag=false;
                        break;
                    }
                }
                if(flag)System.out.println("NO");
            }
        }
    }
}


    import java.io.*;
    public class PA_ED80 {
        public static void main(String[] args) throws IOException{
            BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(in.readLine());
            String inp[];
            int n,d;
            boolean flag=true;
            for(int test=0;test<t;test++){
                flag=true;
                inp=in.readLine().split(" ");
                n=Integer.parseInt(inp[0]);
                d=Integer.parseInt(inp[1]);
                double da=d;
                if(d<=n){System.out.println("YES");}
                else{
                    for(int i=1;i<=min(sqrt(d)+10,100010);i++){
                        if(i+Math.ceil(da/(i+1))<=n){
                            System.out.println("YES");
                            flag=false;
                            break;
                        }
                    }
                    if(flag)System.out.println("NO");
                }
            }
        }
    }


import java.io.*;
public class PA_ED80 {
    public static void main(String[] args) throws IOException{
        BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(in.readLine());
        String inp[];
        long n,d;
        boolean flag=true;
        for(int test=0;test<t;test++){
            flag=true;
            inp=in.readLine().split(" ");
            n=Integer.parseInt(inp[0]);
            d=Integer.parseInt(inp[1]);
            if(d<=n){System.out.println("YES");}
            else{
                for(int i=1;i<=d;i++){
                    if(i+Math.ceil((double)d/(i+1))<n){
                        System.out.println("YES");
                        flag=false;
                        break;
                    }
                }
                if(flag)System.out.println("NO");
            }
        }
    }
}


import java.io.*;
public class PA_ED80 {
    public static void main(String[] args) throws IOException{
        BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(in.readLine());
        String inp[];
        long n,d;
        boolean flag=true;
        for(int test=0;test<t;test++){
            flag=true;
            inp=in.readLine().split(" ");
            n=Integer.parseInt(inp[0]);
            d=Integer.parseInt(inp[1]);
            double da=d;
            if(d<=n){System.out.println("YES");}
            else{
                for(int i=1;i<=d;i++){
                    if(i+Math.ceil(da/(i+1))<=n){
                        System.out.println("YES");
                        flag=false;
                        break;
                    }
                }
                if(flag)System.out.println("NO");
            }
        }
    }
}


import java.io.*;
public class PA_ED80 {
    public static void main(String[] args) throws IOException{
        BufferedReader in= new BufferedReader(new InputStreamReader(System.in));
        int t=Integer.parseInt(in.readLine());
        String inp[];
        long n,d;
        boolean flag=true;
        for(int test=0;test<t;test++){
            flag=true;
            inp=in.readLine().split(" ");
            n=Integer.parseInt(inp[0]);
            d=Integer.parseInt(inp[1]);
            if(d<=n){System.out.println("YES");}
            else{
                for(int i=1;i<=d;i++){
                    if(i+Math.ceil((double)d/(i+1))<=n){
                        System.out.println("YES");
                        flag=false;
                        break;
                    }
                }
                if(flag)System.out.println("NO");
            }
        }
    }
}


import java.io.*;

public class problem {
    public static void main(String[] args) throws Exception {
        BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
        int bLoop=Integer.parseInt(infile.readLine());
        for(int loop=1;loop<=bLoop;loop++){
            String in1=infile.readLine();
            int n = Integer.parseInt(in1.substring(0,in1.indexOf(" ")));
            int d=Integer.parseInt(in1.substring(in1.indexOf(" ")+1));
            boolean state=false;
            for(int x=0;x<=n;x++){
                int timeToRun=helper(x,d);
                if(timeToRun+x<=n){
                    state=true;
                    break;
                }
            }
            if(state)
                System.out.println("YES");
            else
                System.out.println("NO");
        }
    }
    private static int helper(int x,int d){
        double temp=(double) d / (x+1);
        return (int)Math.ceil(temp);
    }
}


import java.util.*;
import java.lang.Math;
import java.util.Arrays;
public class Main
{
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
	    int t,n=0,d=0,ans=0;
		t=in.nextInt();
		in.nextLine();
		for(int i=0;i<t;i++)
		{
		    ans=0;
		    n=in.nextInt();
		    d=in.nextInt();
		    if(n>=d)
		    {
		        System.out.println("YES");
		        ans=1;
		    }
			else
			{
		    for(int j=n/6;j<=n/2+10;j++)
		    {
		        if(ans!=1&&(j+Math.ceil((double)d/(j+1)))<=n)
		        {
		            System.out.println("YES");
					ans=1;
		            break;
		        }
		    }
			}
		    if(ans==0)
		    {
		        System.out.println("NO");
		    }
		}
	}
}


import java.util.*;
import java.lang.Math;
import java.util.Arrays;
public class Main
{
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
	    int t,n=0,d=0,ans=0;
		t=in.nextInt();
		in.nextLine();
		for(int i=0;i<t;i++)
		{
		    ans=0;
		    n=in.nextInt();
		    d=in.nextInt();
		    if(n>=d)
		    {
		        System.out.println("YES");
		        ans=1;
		    }
			else
			{
		    for(int j=n/6;j<=n/2+10;j++)
		    {
		        if(ans!=1&&(j+Math.ceil(d/(j+1)))<n)
		        {
		            System.out.println("YES");
					ans=1;
		            break;
		        }
		    }
			}
		    if(ans==0)
		    {
		        System.out.println("NO");
		    }
		}
	}
}


import java.util.*;
import java.lang.Math;
import java.util.Arrays;
public class Main
{
	public static void main(String args[])
	{
		Scanner in=new Scanner(System.in);
	    int t,n=0,d=0,ans=0;
		t=in.nextInt();
		in.nextLine();
		for(int i=0;i<t;i++)
		{
		    ans=0;
		    n=in.nextInt();
		    d=in.nextInt();
		    if(n>=d)
		    {
		        System.out.println("YES");
		        ans=1;
		    }
			else
			{
		    for(int j=n/4;j<=n/2;j++)
		    {
		        if(ans!=1&&(j+Math.ceil(d/(j+1)))<n)
		        {
		            System.out.println("YES");
					ans=1;
		            break;
		        }
		    }
			}
		    if(ans==0)
		    {
		        System.out.println("NO");
		    }
		}
	}
}


import java.util.Scanner;
public class DeadLine {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        for (int m = 0; m < t; m++) {
            int n = sc.nextInt();
            double d = sc.nextInt();
            if (d <= n)
                System.out.println("YES");
            else {
                int f = 0;
                for (int x = 1; x < n; x++) {
                    int days = (int) Math.ceil(d / (x + 1));
                    if (days + x <= n) {
                        f = 1;
                        System.out.println("YES");
                        break;
                    }
                }
                if (f == 0)
                    System.out.println("NO");
            }
        }
    }
}


import java.util.*;
public class asd
{
    public static void main(String arg[])

    {
        Scanner s=new Scanner(System.in);
        int t=s.nextInt();
        while(t-->0)
        {
            int x=s.nextInt();
            int y=s.nextInt();
            String str="";
            if(x>=y)
            str="YES";
            else
            {
                double o=(Math.floor(Math.sqrt(y)-1.00));
                double p=(Math.ceil(y/(o+1.0)));
                 if((p+o)<=((double)x))
                 str="YES";
                 else
                 str="NO";
            }
            System.out.println(str);
        }
    }
}


import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
    boolean check = false ;
    int t = input.nextInt();
    double n , d ;
    for (int i = 0 ; i < t ; i ++) {
        check = false ;
        n = input.nextLong();
        d = input.nextLong();

        if ( n != d) {

        for (double x = 1 ; x <= n ; x ++)
        {
            double opt = x + Math.ceil(d/(x+1.0));
            if (opt <= n)
            {
                check = true ;
                break ;
            }
            else {
                check = false ;
            }
        }
        }
        else {
            check = true ;
        }
        if (check)
            System.out.println("YES");
        else System.out.println("NO");

    }

}

}


import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
    boolean check = false ;
    int t = input.nextInt();
    double n , d ;
    for (int i = 0 ; i < t ; i ++) {
        check = false ;
        n = input.nextLong();
        d = input.nextLong();

        if ( n != d) {

        for (double x = 1 ; x <= n ; x ++)
        {
            double opt = x + Math.ceil(d/(x+1.0));
            if (opt <= n)
            {
                check = true ;
                break ;
            }
            else {
                check = false ;
            }
        }
        }
        else {

        if (check)
            System.out.println("YES");
        else System.out.println("NO");

        }
    }

}

}


import java.util.*;import java.io.*;import java.math.*;

public class Main
{
    static boolean check(long x,long d,long n){
        if(x+Math.ceil(d/(x+1.0d))<=n)
            return true;
        return false;
    }

    public static void process()throws IOException
    {
        long n=ni(),d=ni(),l=0l,r=n;

        while(l<=r){
            long mid=l+(r-l)/2l;

            if(check(mid,d,n)){
                pn("YES");
                return;
            }
            else
                r=mid-1;
        }
        pn("NO");
    }

    static AnotherReader sc;
    static PrintWriter out;
    public static void main(String[]args)throws IOException
    {
        out = new PrintWriter(System.out);
        sc=new AnotherReader();
        boolean oj = true;

        oj = System.getProperty("ONLINE_JUDGE") != null;
        if(!oj) sc=new AnotherReader(100);

        long s = System.currentTimeMillis();
        int t=ni();
        while(t-->0)
            process();
        out.flush();
        if(!oj)
            System.out.println(System.currentTimeMillis()-s+"ms");
        System.out.close();
    }

    static void pn(Object o){out.println(o);}
    static void p(Object o){out.print(o);}
    static void pni(Object o){out.println(o);System.out.flush();}
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static double nd()throws IOException{return sc.nextDouble();}
    static String nln()throws IOException{return sc.nextLine();}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
    static boolean multipleTC=false;

/////////////////////////////////////////////////////////////////////////////////////////////////////////

    static class AnotherReader{BufferedReader br; StringTokenizer st;
    AnotherReader()throws FileNotFoundException{
    br=new BufferedReader(new InputStreamReader(System.in));}
    AnotherReader(int a)throws FileNotFoundException{
    br = new BufferedReader(new FileReader("input.txt"));}
    String next()throws IOException{
    while (st == null || !st.hasMoreElements()) {try{
    st = new StringTokenizer(br.readLine());}
    catch (IOException  e){ e.printStackTrace(); }}
    return st.nextToken(); } int nextInt() throws IOException{
    return Integer.parseInt(next());}
    long nextLong() throws IOException
    {return Long.parseLong(next());}
    double nextDouble()throws IOException { return Double.parseDouble(next()); }
    String nextLine() throws IOException{ String str = ""; try{
    str = br.readLine();} catch (IOException e){
    e.printStackTrace();} return str;}}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
}


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int t=scanner.nextInt();
        while (t-->0)
        {
            int n=scanner.nextInt();
            int d=scanner.nextInt();
            boolean ok=false;
            for (int i=0; i<n; ++i)
            {
                if (i+Math.ceil((double)d/((double)(i+1)))<=n)
                {
                    System.out.println("YES");
                    ok=true;
                    break;
                }
            }
            if (!ok) System.out.println("NO");
        }
    }
}


import java.util.*;

public class S{
	static int n;

	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int q = in.nextInt();
		for(int i = 0; i < q; i++){
			int n = in.nextInt(), d = in.nextInt();
			if(d <= n)
				System.out.println("YES");
			else{
				boolean bool = false;
				for(int j = 1; j <= n; j++){
					double dou = (d * 1.0) / (j + 1);
					int k = (int)(Math.ceil(d * 1.0 / (j + 1)));
					if(k + j <= n){
						bool = true;
						break;
					}
					//System.out.println(j + " " + k + " " + dou + " " + bool);
				}
				if(bool)
					System.out.println("YES");
				else
					System.out.println("NO");
			}
		}
	}
}


import java.util.*;

public class S{
	static int n;

	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int q = in.nextInt();
		for(int i = 0; i < q; i++){
			int n = in.nextInt(), d = in.nextInt();
			if(d - n <= 1)
				System.out.println("YES");
			else if(d <= n)
				System.out.println("YES");
			else{
				boolean bool = false;
				for(int j = 1; j <= n; j++){
					double dou = (d * 1.0) / (j + 1);
					int k = (int)(Math.ceil(dou));

					if(k + j <= n)
						bool = true;
					//System.out.println(j + " " + k + " " + dou + " " + bool);
				}
				if(bool)
					System.out.println("YES");
				else
					System.out.println("NO");
			}
		}
	}
}


import java.util.*;

public class S{
	static int n;

	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int q = in.nextInt();
		for(int i = 0; i < q; i++){
			int n = in.nextInt(), d = in.nextInt();
			if(d <= n)
				System.out.println("YES");
			else{
				boolean bool = false;
				for(int j = 1; j <= n; j++){
					double dou = (d * 1.0) / (j + 1);
					int k = (int)(Math.ceil(dou));

					if(k + j <= n)
						bool = true;
					//System.out.println(j + " " + k + " " + dou + " " + bool);
				}
				if(bool)
					System.out.println("YES");
				else
					System.out.println("NO");
			}
		}
	}
}


import java.util.*;

public class S{
	static int n;

	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int q = in.nextInt();
		for(int i = 0; i < q; i++){
			int n = in.nextInt(), d = in.nextInt();
			if(n - d <= 1)
				System.out.println("YES");
			else if(d <= n)
				System.out.println("YES");
			else{
				boolean bool = false;
				for(int j = 1; j <= n; j++){
					double dou = (d * 1.0) / (j + 1);
					int k = (int)(Math.ceil(dou));

					if(k + j <= n)
						bool = true;
					//System.out.println(j + " " + k + " " + dou + " " + bool);
				}
				if(bool)
					System.out.println("YES");
				else
					System.out.println("NO");
			}
		}
	}
}


package codeforces;
import java.util.*;
import java.lang.*;
public class Cf1288A {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int t,n,d,l;
		t=sc.nextInt();
		while(t>0) {
			n=sc.nextInt();
			d=sc.nextInt();
			if((int)Math.ceil(2*Math.sqrt(d)-1)<=n)
				System.out.println("YES");
			else
				System.out.println("NO");
			t--;
		}
		sc.close();
	}

}