407906: GYM102939 D Robot Toss
Description
Alice and Bob have become intelligent robots! They have acquired a ball and want to toss it back and forth to each other. However, the sneaky Eve wants to steal their ball.
Alice and Bob are at $$$(x_a, y_a)$$$ and $$$(x_b, y_b)$$$ on the coordinate plane, respectively, where both their locations are lattice points (the coordinates are integers). Eve is also located at a lattice point, and if the path of the ball crosses directly overhead of Eve, she is able to jump up and steal the ball. However, if Eve is not directly on the path, she will not be able to intercept the ball.
Given multiple possible locations of Eve, determine if Alice and Bob's game of toss would be interrupted.
InputThe first line of the input contains $$$x_a$$$ and $$$y_a$$$, Alice's location.
The next line of the input contains $$$x_b$$$ and $$$y_b$$$, Bob's location.
The next line contains $$$E$$$ $$$(1 \le E \le 100)$$$, the number of different possible locations of Eve.
The next $$$E$$$ lines each contain $$$x, y$$$, a possible location of Eve.
We know that $$$-10^4 \le x_a, x_b, x, y_a, y_b, y \le 10^4$$$.
OutputOutput $$$E$$$ lines, where each line is a simple Yes or No, corresponding to if Eve can intercept Alice and Bob's ball.
ExampleInput0 0 2 2 2 1 1 -1 -1Output
Yes No