import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); int[] as = new int[N]; int[] bs = new int[N]; for(int i = 0; i < N; i++){ final int a = sc.nextInt(); as[i] = a; } for(int i = 0; i < N; i++){ final int b = sc.nextInt(); bs[i] = b; } int solved = 0, unsolved = 0; for(int i = 0; i < N; i++){ if(bs[i] == 0){ unsolved += as[i]; }else{ solved += as[i]; } } System.out.println(solved <= unsolved ? "YES" : "NO"); } }