#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from math import ceil

def solve(A, B, C, D):
    if A < B or D < B: return False
    if A % B > C: return False

    if D % B == 0: return True
    x = (C - (A % B)) // (D % B) + 1
    if (A + x * (D % B)) % B > C: return False
    return True


T = int(input())
for i in range(T):
    A, B, C, D = [int(t) for t in input().split()]
    print('Yes' if solve(A, B, C, D) else 'No')
