import java.util.*;

public class Main
{
	public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	}
} import java.util.*; util.* java public class Main
{
	public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	}
} Main public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	} main {
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	} int a; a Scanner sc=new Scanner(System.in); sc new Scanner(System.in) a=sc.nextInt() a sc.nextInt() sc.nextInt sc int c=0; c 0 int b[]=new int[a]; b new int[a] a for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<a i a i++ i++ i {
			b[i]=sc.nextInt();
		} {
			b[i]=sc.nextInt();
		} b[i]=sc.nextInt() b[i] b i sc.nextInt() sc.nextInt sc Arrays.sort(b) Arrays.sort Arrays b for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		} int j=0; int j=0; j 0 j<a-1 j a-1 a 1 j++ j++ j {
			if(b[j]==b[j+1])
			{ c=c+1; }
		} {
			if(b[j]==b[j+1])
			{ c=c+1; }
		} if(b[j]==b[j+1])
			{ c=c+1; } b[j]==b[j+1] b[j] b j b[j+1] b j+1 j 1 { c=c+1; } c=c+1 c c+1 c 1 if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");} c>0 c 0 {System.out.println("NO");} System.out.println("NO") System.out.println System.out System System.out "NO" {System.out.println("YES");} System.out.println("YES") System.out.println System.out System System.out "YES" String args[] args public class Main
{
	public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	}
} public class Main
{
	public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	}
} Main
import java.util.*;

public class Main
{
	public static void main(String args[])
	{
		int a;
		Scanner sc=new Scanner(System.in);
		a=sc.nextInt();
		int c=0;
		int b[]=new int[a];
		for(int i=0;i<a;i++)
		{
			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		for(int j=0;j<a-1;j++)
		{
			if(b[j]==b[j+1])
			{ c=c+1; }
		}
		if(c>0)
		{System.out.println("NO");}
		else
		{System.out.println("YES");}
	
	}
}