N,H=open(0);H=sorted(H);print("YNeos"[(H[1]>'1')&(H[1]!=H[2])::2])