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