T=int(input()) for _ in range(T): n,m=map(int,input().split()) a=list(map(int,input().split())) f=1 for i in range(n-1): f&=(m-a[i])+(m-a[i+1])<=m print(["No","Yes"][f])