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