puts gets.to_i.times.map {
  a, b, c, d = gets.split.map(&:to_i)
  next 'No' if a < b || d < b
  inc = d % b
  start = a % b
  next 'No' if c < start
  next 'Yes' if inc == 0
  next 'No' if start + ((c - start) / inc + 1) * inc < b
  'Yes'
}
