package main import ( "fmt" ) func main() { var N int fmt.Scan(&N) a := make([]int, N) b := make([]int, N) for i := 0; i < N; i++ { fmt.Scan(&a[i]) } for i := 0; i < N; i++ { fmt.Scan(&b[i]) } var K, sum int for i := 0; i < N; i++ { if b[i] == 0 { K += a[i] } else { sum += a[i] } } if K >= sum { fmt.Println("YES") } else { fmt.Println("NO") } }