How to Steal a Million
Once, Mykhailovych watched the movie "How to Steal a Million" and discovered that a remake was in the works. He was particularly captivated by the scene where actor Peter O'Toole uses a boomerang to set off an alarm. Inspired, he decided to assist the remake's director in creating top-notch special effects (after all, what's the point of remaking a classic film otherwise?) by developing a program to calculate where the boomerang's flight path intersects with the alarm beam system. The alarm beam system is represented as a closed polygonal line, which may include self-intersections.
Input
The first line contains three integers: x, y, and r. These represent the coordinates of the center of the circle, which models the boomerang's flight path, and its radius. The numbers are separated by at least one space. All these values are within 20000 in absolute value, and the radius is positive.
The second line contains a single natural number n (2 ≤ n ≤ 1000), indicating the number of alarm devices (points where the beams originate and terminate).
The following n lines each contain two integers, separated by at least one space, which do not exceed 20000 in absolute value. These are the coordinates of the alarm devices, listed in the order they are connected by beams, with the last device connected back to the first.
Output
Print YES if the boomerang touches or crosses at least one beam (or hits a device), and NO otherwise.