N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) x = [0, 0] for i, b in enumerate(B): if b != 0: x[0] += A[i] else: x[1] += A[i] print('YES' if x[0] <= x[1] else 'NO')