#d1502. 区间和

区间和

Range Sum

Problem Description

Xiaohong has a secret array AA of length NN. She will give you QQ hints; the ii-th hint tells you the sum of the consecutive elements from LiL_i to RiR_i of array AA. Can you determine, from these QQ hints, the sum of all elements of array AA? If yes, output Yes; otherwise output No.

Input Format

The first line contains two integers NN and qq; then there are QQ lines, each containing two integers LiL_i and RiR_i.

Output Format

Output Yes or No, indicating whether the total sum can be determined.

Sample Input

4 3
1 3
1 2
2 3

Sample Output

No

Constraints

1≤N≤2×1051 \le N \le 2 \times 10^5

1≤Q≤min⁡(2×105,N(N+1)2)1 \le Q \le \min(2 \times 10^5, \frac{N(N+1)}{2})

1≤Li≤Ri≤N1 \le L_i \le R_i \le N

(Li,Ri)≠(Lj,Rj)(L_i, R_i) \neq (L_j, R_j) for i≠ji \neq j