import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    t = int(input())

    from math import ceil

    for i in range(t):
        a, b, c, d = list(map(int, readline().split()))
        if a >= b and d >= b:
                x = a % b
                y = d % b
                if y == 0:
                    if x <= c:
                        z = x + d
                    else:
                        z = x
                else:
                    z = y * ceil((c + 1 - x) / y) + x
                if z >= b:
                    print('Yes')
                    continue
        print('No')

if __name__ == '__main__':
    main()
