def main(a, b, c, d)
  diff = d - b
  if diff > 0
    temp = ((c-(a-b)) / diff) + 1
    temp = temp*diff + a - b 
    if temp < b
      puts 'No'
    else
      puts 'Yes'
    end
  elsif diff == 0
    if a-b > c && a-b < b
      puts 'No'
    else
      puts 'Yes'
    end
  else
    puts 'No'
  end
  return
end
def check(a, b, c, d)
  if a < b
    puts 'No'
    return false
  end
  true
end
z = $stdin.read.split("\n")
z.each.with_index do |n, i|
  next if i == 0
  a,b,c,d = n.split(" ").map{|f| f.to_i}
  check = check(a, b, c, d)
  if check
    main(a, b, c, d)
  end
end