def judge a,b,c,d
  return false if a < b
  return false if d < b
  return true if b < c
  temp1 = a % b
  temp2 = d % b
  temp3 = b - temp1 - 1
  temp4 = c - temp1
  if temp2 == 0
    return false if temp1 > c
    return true
  end
  return false if temp3 - temp4 >= temp2
  return false if temp3 % temp2 < temp4 % temp2
  return true
end

T = gets.to_i
T.times { (a,b,c,d) = gets.split.map(&:to_i); puts judge(a,b,c,d) ? "Yes" : "No" }