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