T = int(input())

for _ in range(T):
    a, b, c, d = map(int, input().split())

    if a < b:
        print("No")
        continue

    if b <= c:
        if b <= d:
            print("Yes")
            continue
        else:
            if a % b + b < c:
                print("Yes")
                continue
            else:
                print("No")
                continue
    else:
        if b == d:
            if a%b <= c:
                print("Yes")
                continue
            else:
                print("No")
                continue
        elif b > d:
            print("No")
            continue
        parity_buy = (b % 2 == 0)
        parity_charge = (d % 2 == 0)

        cand = [i for i in range(c+1, b)]

        if parity_buy and parity_charge:
            a_even = (a % 2) == 0
            if a_even:
                cand = list(filter(lambda x: x % 2 == 0, cand))
            else:
                cand = list(filter(lambda x: x % 2 == 1, cand))

        if len(cand) != 0 and a%b > c:
            print("No")
            continue
        else:
            print("Yes")
            continue

