N = int(input()) A = list(map(int, input().split())) print("Yes" if max(A) < 5 else "No")