T = int(input()) def calc(N,M,A): stop = M over = 0 for a in A: if a > M: return 'No' if over <= a: pass else: return 'No' stop = a over = M - a return 'Yes' for _ in range(T): N,M = map(int,input().split()) A = list(map(int,input().split())) print(calc(N,M,A))