import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0, ans2 = 0; int [] a = new int[n]; int [] b = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } for (int i = 0; i < n; i++) { b[i] = sc.nextInt(); if (b[i] != 0) ans += a[i]; else if (b[i] == 0) ans2 += a[i]; } if (ans <= ans2) { System.out.println("YES"); } else { System.out.println("NO"); } sc.close(); } }