t = int(input())

for _ in range(t):
    a, b, c, d = map(int, input().split())
    cond = True
    
    if a < b or b > d or (a % b) > c:
        cond = False
    
    
    if b != d:
        if (b - c) > (d - b):
            cond = False
            
        if cond:
            for i in range(c + 1, b):
                if (i - (a % b)) % (d - b) == 0:
                    cond = False
                    break
    
        
    if cond:
        print('Yes')
    else:
        print('No')