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

namespace AtTest.AGC026
{
    class AtTemplate
    {
        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]);
            }

            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 || a % b > c) return false;
            if (b == d) return true;
            long margin = a % b;
            long delta = d - b;
            long shou = (c-margin) / delta;
            if (b <= delta * (shou + 1) + margin) return true;
            return false;

        }
    }
}