import java.util.Scanner; public class N216 { public static void main(String[] args) { Scanner sca = new Scanner(System.in); int N = sca.nextInt(); int a[] = new int[N]; int b[] = new int[N]; int K = 0; int L = 0; for (int i = 0; i < N; i++) a[i] = sca.nextInt(); for (int i = 0; i < N; i++) b[i] = sca.nextInt(); for (int i = 0; i < N; i++) { if (b[i] == 0) K += a[i]; else L += a[i]; } System.out.println((K >= L) ? "YES" : "NO"); } }