from fractions import gcd

def solve(a, b, c, d):
    if d < b: return False
    g = gcd(d, b)
    a, ar = divmod(a, g)
    c, cr = divmod(c, g)
    d /= g
    b /= g
    if ar > cr: c -= 1
    if a < b: return False
    return c >= b - 1

for cas in xrange(input()):
    print 'Yes' if solve(*map(int, raw_input().split())) else 'No'
