n=int(input()) a=list(set(map(int,input().split()))) if 0 in a: print("NO") else: if len(a)==2 and a[0]+a[-1]==0: print("NO") else: print("YES")