<?php 
fscanf(STDIN, "%d", $T);
for($i=0;$i<$T;$i++){
$array = explode(" ",trim(fgets(STDIN)));
$ans = 0;

$ab=$array[0] - $array[1];
$db=$array[3] - $array[1];
if($ab>=0){
  if($array[0] % $array[1] <= $array[2]){
      $s = $db*ceil($array[2]-$ab/$db);
        if($s <= $array[2]){
          $ans=1;
        }else{
          $ans=0;
        }
  }else $ans=0;
}else $ans=0;

if($ans==1){
  echo "Yes"."\n";
}else {
  echo "No"."\n";
}
}
 ?>