eolymp
bolt
Try our new interface for solving problems

Ring

Визначте, чи належить точка \textbf{A}, що задана координатами (\textbf{x}; \textbf{y}), частині площини, виокремленій кільцем з радіусами \textbf{R_1} і \textbf{R_2} та центром у точці \textbf{O} (\textbf{x_0}; \textbf{y_0}). \InputFile The first line sets the coordinates of a given point (\textbf{x}; \textbf{y}). In the second row, first coordinates of the center of the ring (\textbf{x_0}; \textbf{y_0}), and then the radii \textbf{R_1} and \textbf{R_2}. All input data are integers, and do not exceed the modulo \textbf{100}. \OutputFile In a single line display a message \textbf{YES} - if the point belongs to this part of the plane, \textbf{NO} - if not own, and \textbf{ON BORDER} - if we "lucky" and a point belongs to the line, which restricts the specified portion of the plane. In this problem, assume that the point belongs to any of the boundary lines of the specified portion of the plane, if at the same abscissas distance from it to some of the limiting lines ofplane of the along the vertical axis is less than \textbf{0.01}, orat the same coordinates, the distance from point to some of the constraints of the plane line on the horizontal axis and less than \textbf{0.01}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5 9
8 6 3 5
Output example #1
YES
Source ДПА 2011 - в.3