#B2051. Point in Square
Point in Square
Point in Square
Given a square with its four vertices defined by the coordinates $$ (1,-1) $$, $$ (1,1) $$, $$ (-1,-1) $$, and $$ (-1,1) $$ (where x represents the horizontal axis and y represents the vertical axis), write a program to determine whether a given point is inside the square or on its boundary.
inputFormat
The input consists of a single line containing two space-separated numbers: x and y.
outputFormat
Output a single line: "YES" if the point is inside or on the boundary of the square, otherwise "NO".
sample
0 0
YES