using System;
using System.Collections.Generic;
using System.Text;

namespace AtTest.AGC026
{
    class B
    {
        static void Main(string[] args)
        {
            Method(args);
            Console.ReadLine();
        }

        static void Method(string[] args)
        {
            int t = int.Parse(Console.ReadLine());
            long[,] query = new long[t, 4];
            for (int i = 0; i < t; i++)
            {
                string[] input = Console.ReadLine().Split(' ');
                query[i, 0] = long.Parse(input[0]);
                query[i, 1] = long.Parse(input[1]);
                query[i, 2] = long.Parse(input[2]);
                query[i, 3] = long.Parse(input[3]);
                if (Eternal(query[i, 0], query[i, 1], query[i, 2], query[i, 3]))
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }

            /*for (int i = 0; i < t; i++)
            {
                if (Eternal(query[i, 0], query[i, 1], query[i, 2], query[i, 3]))
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }*/
        }

        static bool Eternal(long a, long b, long c, long d)
        {
            if (b > d || b > a) return false;//絶対無理のパターン
            
            long firstStock = 0;
            if (a <= c)
            {
                firstStock = a - b;
            }
            else
            {
                long mar = a % b - b;

                long ite = (c - mar) / b;
                firstStock = mar + ite * b;
            }
            if (firstStock < 0) return false;
            if (b == d) return true;//絶対okのパターン

            long delta = d - b;//入荷後に購入した場合の在庫変化
            long cnt = (c - firstStock) / delta;
            if (b <= firstStock + delta * cnt + delta) return true;

            return false;
        }
    }
}