Imports System
Imports System.Collections

Module Program
    Sub Main(args As String())
        Dim intN As Integer = Console.ReadLine()
        Dim tmpA As String() = Split(Console.ReadLine(), " ")

        Dim i As Integer = 0
        Dim ht As Hashtable = New Hashtable

        For i = 1 To intN - 1
            If ht(tmpA(i)) = 1 Then
                Console.WriteLine("NO")
                Exit Sub
            End If
            ht(tmpA(i)) = 1
        Next
        Console.WriteLine("YES")
    End Sub
End Module
