import java.util.Scanner; public class yukicoder_216 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int[] a = new int[n]; int[] b = new int[n]; for (int i = 0; i < n; i++) { a[i] = stdIn.nextInt(); } for (int i = 0; i < n; i++) { b[i] = stdIn.nextInt(); } int ok = 0; int ng = 0; for (int i = 0; i < n; i++) { if (b[i] == 0) { ok += a[i]; } else { ng += a[i]; } } if (ok >= ng) { System.out.println("YES"); } else { System.out.println("NO"); } } }