n=int(input()) A=list(map(int,input().split())) print('Yes' if 0<=min(A)<=1 else 'No')