from sys import stdin input = stdin.readline for _ in range(int(input())): N, P, K = map(int, input().split()) if K%P == 0 or P-1 <= K and (K-(P-1))%P == 0: print("Yes") else: print("No")