시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB85454051.282%

문제

After years of space exploration, humans succeeded in bringing back a small amount of sample materials from an asteroid to Earth! The materials were stored in several bottles, each containing a complete mixture of two liquids, A and B.

Intense discussion finally reached an agreement that all the materials brought back should be distributed to the research institutes participated in the exploration. The amounts of the liquids A and B to be sent were decided depending on the research topics of each of the institutes.

However, after this decision, a problem was found that it is impossible with current human technologies to separate two liquids from the mixture. The only operations we can perform are to take some amounts of the mixtures from one or more bottles and put them together in a new bottle.

Your task is to judge whether the agreed distribution of the liquids is possible ever.

입력

The input consists of a single test case of the following format.

$n$ $m$

$a_1$ $\cdots$ $a_n$

$b_1$ $\cdots$ $b_n$

$c_1$ $\cdots$ $c_n$

$d_1$ $\cdots$ $d_n$

Here, $n$ is the number of the bottles initially containing the mixtures of liquid A and liquid B, while $m$ is the number of the research institutes to which liquids are to be sent. Both $n$ and $m$ are positive integers not greater than $500$. The following two lines contain $n$ integers each, meaning that the $i$-th bottle ($1 ≤ i ≤ n$) initially contains the mixture of $a_i$ mL of liquid A and $b_i$ mL of liquid B. The following two lines contain $m$ integers each, meaning that a bottle containing $c_j$ mL of liquid A and $d_j$ mL of liquid B is to be sent to the $j$-th institute ($1 ≤ j ≤ m$). All of $a_i$, $b_i$, $c_j$ and $d_j$ are positive integers not greater than $10^6$. Both $\sum_{i=1}^{n}{a_i} = \sum_{j=1}^{m}{c_j}$ and $\sum_{i=1}^{n}{b_i} = \sum_{j=1}^{m}{d_j}$ hold.

출력

If the agreed distribution is possible, output Yes; otherwise, output No in a line.

예제 입력 1

2 2
1 3
3 1
2 2
1 3

예제 출력 1

Yes

예제 입력 2

2 2
2 2
2 2
1 3
3 1

예제 출력 2

No

예제 입력 3

3 5
2 5 8
3 5 7
3 3 3 3 3
3 3 3 3 3

예제 출력 3

Yes

예제 입력 4

3 2
4 4 4
1 9 5
6 6
2 13

예제 출력 4

No

힌트

For Sample Input 1, the only way that conforms to the decision is to send $0.5$ mL from the bottle $1$ and $2.5$ mL from the bottle $2$ put together in a bottle to the institute $1$, and a bottle of the rest to the institute $2$.

For Sample Input 2, the distribution agreement cannot be fulfilled.