import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

T = ir()

def check(a, b, c, d, i):
    if a < b or d < b:
        print('No')
    else:
        a %= b
        if d > b:
            d %= b
            d += b        
        X = np.array([a] + [d] * 10 ** 4)
        Xcum = (X.cumsum() % b)
        Xcum[Xcum<=c] += d
        bool = np.any(Xcum < b)
        print('No' if bool else 'Yes')

for i in range(T):
    check(*(lr() + [i]))

# 10