N = int(input()) A = list(map(int,input().split())) m = 0 M = 0 p = 0 P = 0 for a in A: if a > 0: p += 1 P += a elif a < 0: m += 1 M += a if -M >= P and m <= p: print('Yes') elif -M <= P and m >= p: print('Yes') else: print('No')