fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let t: u64 = s.trim().parse().unwrap(); for _ in 0..t { s.clear(); std::io::stdin().read_line(&mut s).ok(); let m: Vec = s.split_whitespace().flat_map(str::parse).collect(); s.clear(); std::io::stdin().read_line(&mut s).ok(); let a: Vec = s.split_whitespace().flat_map(str::parse).collect(); println!( "{}", if a.windows(2) .all(|a| m[1] <= a[0] + a[1] && a[0] + a[1] <= 2 * m[1]) { "Yes" } else { "No" } ); } }