using System;
using System.Linq;

namespace AGC026.Task02
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            for (var i = 0; i < n; i++)
            {
                if (Solve())
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }
        }

        public static bool Solve()
        {
            var line = Console.ReadLine().Split(' ').Select(value => long.Parse(value)).ToArray();
            var a = line[0];
            var b = line[1];
            var c = line[2];
            var d = line[3];

            if (a < b)
            {
                return false;
            }

            var diff = d - b;

            if (diff < 0)
            {
                return false;
            }

            if (diff == 0)
            {
                return a - b <= c; 
            }

            if (a % b <= c && (c / diff + 1) * diff >= b)
            {
                return true;
            }

            return false;
        }
    }
}
