t = int(input())
for i in range(t):
    a,b,c,d = map(int, input().split())
    if a < b:
        print('No')
        continue
    if d < b:
        print('No')
        continue
    if c >= b - 1:
        print('Yes')
        continue
    if c < a % b:
        print('No')
        continue
    if b == d:
        print('Yes')
        continue
    if c < (a + d) % b:
        print('No')
        continue
    if d % b == 0:
        print('Yes')
        continue
    if d % b - ((c - (a%b))%(d%b)) + c >= b:
        print('Yes')
        continue
    print('No')
