N = int(raw_input()) score = map(int,raw_input().split()) solve = map(int,raw_input().split()) scoreSum = sum(score) scoreMod = sum([score[i] for i in range(N) if solve[i] == 0]) if scoreMod >= scoreSum / 2: print "YES" else: print "NO"