# cook your dish here

T = int(input())

for i in range(T):
    
    inputs = input().split(' ')
    
    N, x, k = list(map(lambda n: int(n), inputs))
    
    flag = False
    tc = []
    
    for j in range(N+1, 0, -k):
        if (j < x):
            break
        tc.append(j)
    
    for j in range(len(tc)):
        if tc[j] == x:
            flag = True
            break

    if(x % k == 0 or flag):
        print("Yes")
    else:
        print("No")

6940472d68269a35332c1863ef01bdf920dfb30e
<mask token>

<mask token>
for i in range(T):
    inputs = input().split(' ')
    N, x, k = list(map(lambda n: int(n), inputs))
    flag = False
    tc = []
    for j in range(N + 1, 0, -k):
        if j < x:
            break
        tc.append(j)
    for j in range(len(tc)):
        if tc[j] == x:
            flag = True
            break
    if x % k == 0 or flag:
        print('Yes')
    else:
        print('No')

T = int(input())
for i in range(T):
    inputs = input().split(' ')
    N, x, k = list(map(lambda n: int(n), inputs))
    flag = False
    tc = []
    for j in range(N + 1, 0, -k):
        if j < x:
            break
        tc.append(j)
    for j in range(len(tc)):
        if tc[j] == x:
            flag = True
            break
    if x % k == 0 or flag:
        print('Yes')
    else:
        print('No')

# cook your dish here

T = int(input())

for i in range(T):
    
    inputs = input().split(' ')
    
    N, x, k = list(map(lambda n: int(n), inputs))
    
    flag = False
    tc = []
    
    for j in range(N+1, 0, -k):
        if (j < x):
            break
        tc.append(j)
    
    for j in range(len(tc)):
        if tc[j] == x:
            flag = True
            break

    if(x % k == 0 or flag):
        print("Yes")
    else:
        print("No")
