unittest
{
	assert( [ "5", "2 6 1 4 5" ].parse.expand.solve == "YES" );
	assert( [ "6", "4 1 3 1 6 2" ].parse.expand.solve == "NO" );
	assert( [ "2", "10000000 10000000" ].parse.expand.solve == "NO" );
}



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

auto solve( long[] as )
{
	bool[ long ] bs;
	foreach( a; as )
	{
		if( a in bs ) return "NO";
		bs[ a ] = true;
	}
	return "YES";
}
