Death Star

The Death Star is the greatest space station made by The Empire, the forces of darkness. This incredible space station could destroy one planet with just one shot of its high frequency laser and its colossal ion cannon. The Empire is executing the order 3.1415, his target is to destroy The moon Endor, a beautiful natural satellite where The Rebels have their assault base. The Death Star is in position to fire, but its weapon takes around 5 minutes to reload. The Empire has made this weapon with the shape of a five- edged star. When the weapon is loaded the five outer points of the star looks incandescent, and then they can fire and destroy their target. However, this weapon has five weak points: the difference between the star of the weapon minus the circumscribed pentagon of the middle of the same star, in other words, the triangles of the star, including the lines that form it. You are a rebel commander, and your mission is to fly an x-wing and destroy the weapon of the Death Star shooting at the weak points. Input The input consists of several test cases. A test case starts with five lines, each one has a pairs of integers x, y (−500 ≤ x, y ≤ 500) that represents the Cartesian coordinates of the pentagon in which the weapon that has the shape of a star is inscribed. These points are in clockwise order. The next line has an integer n (1 ≤ n ≤ 100), that represents the number of bullets fired at the weapon. The next n lines have a pair of integer x, y that represents the Cartesian coordinate of the impact of the bullets. Output If the five points couldn’t inscribe a star, print on a single line ‘Impossible’, otherwise, if a rebel’s bullet impacts in one of the weak point of the weapon print ‘Yes’, but if the bullet doesn’t impact print ‘No’. Sample Input 00 0 10 5 15 10 10 10 0 3 23 58 82

2/2 Sample Output Yes No Yes