{"raw_statement":[{"iden":"problem statement","content":"The battery of Takahashi's smartphone has $N$ mAh capacity. At time $0.5$, $1.5$, $2.5$, and so on (that is, at time $n + 0.5$ for every integer $n$), the battery charge decreases by $1$ mAh.  \nTakahashi will leave his house with his phone fully charged at time $0$, visit a cafe $M$ times, and return home at time $T$.  \nHe will stay at the $i$\\-th cafe from time $A_i$ to time $B_i$. During this stay, he charges his phone, so the battery charge does not decrease. Instead, at time $n + 0.5$ for every integer $n$, it increases by $1$. However, if it is already equal to the battery capacity, it does not increase nor decrease.  \nDetermine whether he can return home without the battery charge dropping to $0$ on the way."},{"iden":"constraints","content":"*   $1 \\le N \\le 10^9$\n*   $1 \\le M \\le 1000$\n*   $1 \\le T \\le 10^9$\n*   $0 \\lt A_1 \\lt B_1 \\lt A_2 \\lt B_2 \\lt A_3 \\lt B_3 \\lt \\dots \\lt A_M \\lt B_M \\lt T$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$ $T$\n$A_1$ $B_1$\n$A_2$ $B_2$\n$A_3$ $B_3$\n$\\hspace{15pt} \\vdots$\n$A_M$ $B_M$"},{"iden":"sample input 1","content":"10 2 20\n9 11\n13 17"},{"iden":"sample output 1","content":"Yes\n\nThe battery charge changes as follows:\n\n*   Time $0$ (leaving home): $10$ mAh\n*   Time $9$ (the beginning of the stay at the first cafe): $1$ mAh\n*   Time $11$ (the end of the stay at the first cafe): $3$ mAh (He charges his phone in a cafe.)\n*   Time $13$ (the beginning of the stay at the second cafe): $1$ mAh\n*   Time $17$ (the end of the stay at the second cafe): $5$ mAh\n*   Time $20$ (getting home): $2$ mAh\n\nDuring this process, the battery charge never drops to $0$, so we print `Yes`."},{"iden":"sample input 2","content":"10 2 20\n9 11\n13 16"},{"iden":"sample output 2","content":"No\n\nThis case is the same as Sample Input/Output 1 until he starts his stay at the second cafe with $1$ mAh charge.  \nWhen he ends his stay there at time $16$, the battery charge is $4$ mAh.  \nThen at time $19.5$, it drops to $0$, so we print `No`."},{"iden":"sample input 3","content":"15 3 30\n5 8\n15 17\n24 27"},{"iden":"sample output 3","content":"Yes\n\nThe battery charge drops to $1$ mAh when he gets home, but it never drops to $0$ on the way."},{"iden":"sample input 4","content":"20 1 30\n20 29"},{"iden":"sample output 4","content":"No\n\nThe battery charge drops to $0$ at time $19.5$."},{"iden":"sample input 5","content":"20 1 30\n1 10"},{"iden":"sample output 5","content":"No\n\nNote that when the battery charge is equal to the battery capacity, staying at a cafe does not increase the battery charge."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}