unittest
{
	assert( [
		"14",
		"9 7 5 9",
		"9 7 6 9",
		"14 10 7 12",
		"14 10 8 12",
		"14 10 9 12",
		"14 10 7 11",
		"14 10 8 11",
		"14 10 9 11",
		"9 10 5 10",
		"10 10 5 10",
		"11 10 5 10",
		"16 10 5 10",
		"1000000000000000000 17 14 999999999999999985",
		"1000000000000000000 17 15 999999999999999985"
	].parse.expand.solve == "No\nYes\nNo\nYes\nYes\nNo\nNo\nYes\nNo\nYes\nYes\nNo\nNo\nYes" );
	assert( [
		"24",
		"1 2 3 4",
		"1 2 4 3",
		"1 3 2 4",
		"1 3 4 2",
		"1 4 2 3",
		"1 4 3 2",
		"2 1 3 4",
		"2 1 4 3",
		"2 3 1 4",
		"2 3 4 1",
		"2 4 1 3",
		"2 4 3 1",
		"3 1 2 4",
		"3 1 4 2",
		"3 2 1 4",
		"3 2 4 1",
		"3 4 1 2",
		"3 4 2 1",
		"4 1 2 3",
		"4 1 3 2",
		"4 2 1 3",
		"4 2 3 1",
		"4 3 1 2",
		"4 3 2 1"
	].parse.expand.solve == "No\nNo\nNo\nNo\nNo\nNo\nYes\nYes\nNo\nNo\nNo\nNo\nYes\nYes\nYes\nNo\nNo\nNo\nYes\nYes\nYes\nNo\nNo\nNo" );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto t = input.front.strip.to!( long );
	auto as = new long[ t ];
	auto bs = new long[ t ];
	auto cs = new long[ t ];
	auto ds = new long[ t ];
	foreach( ref a, ref b, ref c, ref d; lockstep( as, bs, cs, ds ) )
	{
		input.popFront;
		auto abcd = input.front.split.to!( long[] );
		a = abcd[ 0 ];
		b = abcd[ 1 ];
		c = abcd[ 2 ];
		d = abcd[ 3 ];
	}
	return tuple( as, bs, cs, ds );
}

auto solve( long[] as, long[] bs, long[] cs, long[] ds )
{
	auto rs = new string[ as.length ];
	
	E: foreach( ref r, a, b, c, d; lockstep( rs, as, bs, cs, ds ) )
	{
		// 初日で在庫が足りない or 1日で補充が間に合わない
		if( a < b || d < b )
		{
			r = "No";
			continue;
		}
		
		// AとDが大きすぎる場合は途中を省略
		a = ( c < a % b ) ? a % b : a % b + b;
		d = ( c < d % b ) ? d % b : d % b + b;
		
		// 初日で在庫が足りない or 1日で補充が間に合わない
		if( a < b || d < b )
		{
			r = "No";
			continue;
		}
		
		// 買う数と補充が一致
		if( b == d )
		{
			r = "Yes";
			continue;
		}
		
		// 補充が間に合うか判定
		auto xd = d - b;
		auto xs = recurrence!(
			( xs, i )
			{
				if( i % 2 == 1 )
				{
					// 昼に買う
					return xs[ i - 1 ] - b;
				}
				else
				{
					// 夜に補充する
					if( xs[ i - 1 ] <= c ) return xs[ i - 1 ] + d;
					return xs[ i - 1 ];
				}
			}
		)( a );
		xs.popFront;		// 初期値はAと同じなので捨てる
		
		foreach( x; xs )
		{
			if( x < 0 )
			{
				// 補充が間に合わない
				r = "No";
				continue E;
			}
			if( x == a )
			{
				// 初期値に戻っているので無限に続くはず
				r = "Yes";
				continue E;
			}
		}
		
		assert( false );
	}
	
	return rs.join( "\n" );
}
