Codeforces Round #512 (Div. 2)B.Vasya and Cornfield
Vasya owns a cornfield which can be defined with two integers nn and dd . The cornfield can be represented as rectangle with vertices having Cartesian coordinates (0,d),(d,0),(n,n−d)(0,d),(d,0),(n,n−d) and (n−d,n)(n−d,n) .
Vasya also knows that there are mm grasshoppers near the field (maybe even inside it). The ii -th grasshopper is at the point (xi,yi)(xi,yi) . Vasya does not like when grasshoppers eat his corn, so for each grasshopper he wants to know whether its position is inside the cornfield (including the border) or outside.
Help Vasya! For each grasshopper determine if it is inside the field (including the border).
InputThe first line contains two integers nn and dd (1≤d<n≤1001≤d<n≤100 ).
The second line contains a single integer mm (