import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm, std.bigint; void main() { auto N = readln.strip.to!int; auto a = readln.split.to!(int[]); auto b = readln.split.to!(int[]); auto top = zip(a, b).map!(c => c[1]==1?c[0]:0).sum; auto me = zip(a, b).map!(c => c[1]==0?c[0]:0).sum; (top <= me ? "YES" : "NO").writeln; }