n = int(input()) a = list(map(int,input().split())) b = list(map(int,input().split())) k_kun, other = 0,0 for x,y in zip(a,b): if y == 0: k_kun += x else: other += x print('YES') if k_kun >= other else print('NO')