t = int(input()) for i in range(t): n, m = map(int, input().split()) A = list(map(int, input().split())) flg = True for j in range(n-1): if A[j] + A[j+1] >= m: continue else: flg = False break if flg: print("Yes") else: print("No")