t = gets.chomp.to_i
list = t.times.map { gets.chomp.split(' ').map(&:to_i) }
list.each do |line|
  a, b, c, d = line

  if (a < b) || (a % b > c)
    puts 'No'
    next
  end

  x = d - b
  if x == 0
    puts 'Yes'
    next
  elsif  x < 0
    puts 'No'
    next
  end

  ans = 'Yes'
  neg_ans = 0.upto(b - 1).any? do |i|
    w = (c - i) % x
    y = c - w + x
    y < b
  end
  puts neg_ans ? 'No' : 'Yes'
end
