unittest
{
	assert( [ "5", "1 2 1 1 3" ].parse.expand.solve == "Yes" );
	assert( [ "4", "1 3 2 1" ].parse.expand.solve == "No" );
	assert( [ "5", "1 2 3 4 5" ].parse.expand.solve == "Yes" );
	assert( [ "1", "1000000000" ].parse.expand.solve == "Yes" );
}



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 ) )
{
	input.popFront;
	auto hs = input.front.split.to!( long[] );
	return tuple( hs );
}

auto solve( long[] hs )
{
	for( auto i = hs.length.signed - 1; 0 < i; i-- )
	{
		hs[ i - 1 ] -= ( hs[ i ] < hs[ i - 1 ] );
		if( hs[ i ] < hs[ i - 1 ] ) return "No";
	}
	return "Yes";
}
