unittest
{
	assert( [ "5", "2 4", "1 9", "1 8", "4 9", "3 12" ].parse.expand.solve == "Yes" );
	assert( [ "3", "334 1000", "334 1000", "334 1000" ].parse.expand.solve == "No" );
	assert( [ "30", "384 8895", "1725 9791", "170 1024", "4 11105", "2 6", "578 1815", "702 3352", "143 5141", "1420 6980", "24 1602", "849 999", "76 7586", "85 5570", "444 4991", "719 11090", "470 10708", "1137 4547", "455 9003", "110 9901", "15 8578", "368 3692", "104 1286", "3 4", "366 12143", "7 6649", "610 2374", "152 7324", "4 7042", "292 11386", "334 5720" ].parse.expand.solve == "Yes" );
}



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

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

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	auto abs = new long[ 2 ][ n ];
	foreach( ref ab; abs )
	{
		input.popFront;
		ab = input.front.split.to!( long[] );
	}
	return tuple( abs );
}

auto solve( long[ 2 ][] abs )
{
	// 締め切りの遅い順にスケジューリングしてみる
	auto t = long.max;
	foreach( ab; abs.sort!( ( x, y ) => y[ 1 ] < x[ 1 ] ) )
	{
		if( ab[ 1 ] < t ) t = ab[ 1 ];
		t -= ab[ 0 ];
		if( t < 0 ) return "No";
	}
	return "Yes";
}
