import Foundation
 
let N = Int(readLine()!)!
var array =  readLine()!.componentsSeparatedByString(" ").map { Int($0)! }
var answer = "YES"
array = array.sort()
for i in 0 ..< N - 1 {
  	let diff = array[i] - array[i + 1]
    if  diff == 0 {
        answer = "NO"
    }
}
print(answer)