import math
T = int(input())
for i in range(T):
    A,B,C,D = map(int,input().split())
    if B > D:
        print('No')
    elif A < B:
        print('No')
    elif C + 1 >= B:
        print('Yes')
    else:
        r = (A-C)%math.gcd(B,C)
        if C + r >= B:
            print('Yes')
        else:
            print('No')