The admission interview at the prestigious University of Cambridge consist of N tasks, numbered from 1 to N. Alex is there right now, waiting to attend the interview. Takahiro Wong, who has just finished his interview, solved all the tasks. More precisely, he solved the i-th problem after Di seconds from the beginning of the interview.
Knowing the fact that he can solve the i-th problem in Ti seconds, Alex asks himself M questions: x y. For every question, Alex will consider only the tasks from the interval [x;y] and he wants to know whether he can solve each of these tasks before Takahiro Wong. (Alex can solve the tasks from the interval [x;y] in any order).
For example, let’s consider that Alex has to solve the tasks a and b (in this order). He will finish task a after Ta seconds, and task b after Ta + Tb seconds. Alex will solve both problems before Takahiro Wong if Ta < Da and Ta + Tb < Db.
Both Takahiro Wong and Alex will start their interviews at second 0.
Help Alex answer correctly to all M questions.
The first line of the standard input will contain N and M.
On the following N lines, there will be Ti and Di.
On the following M lines, there will be x and y, representing the interval [x;y]
The standard output will contain M lines, the answers to the M questions.
The i-th line will contain:
The 3rd question refers to the interval [1;3]: