"use strict";
const Main = (input) =>{
   let xs = input.trim().split('\n');
   let A = xs[1].trim().split(' ').map(v=>parseInt(v,10));
   let N = xs[0];
   const compare = (a, b) => {
   return a - b;
   }
   A.sort(compare);
   
   let count = 0;
   for(let i =0; i<A.length; i++){
       if(A[i]==A[i+1]){
       count += 1;
       }else{
       count +=0;
       }
   }
   if(count==0){
     console.log('YES');
   }else{
     console.log('NO');
   }
   
} 
Main(require('fs').readFileSync('/dev/stdin','utf8'));