n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) score = 0 for i in range(n): if b[i] == 0: score += a[i] if score >= sum(a) - score: print('YES') else: print('NO')