#t238. 点和正方形的关系
点和正方形的关系
Point and Square
Problem Description
There is a square whose four corners have coordinates equal to , where is the horizontal axis and is the vertical axis. Write a program to determine whether a given point lies inside this square (including its boundary).
Input Format
A single line containing two integers separated by a space, representing the coordinates .
Output Format
A single line: if the point is inside the square, output yes; otherwise output no.
Sample Input
1 1
Sample Output
yes
Hint
- The square's boundary is and .
- The statement says including the boundary — think about whether to use
>=/<=or>/<. - Check against the sample: lies exactly on a corner, so output
yes.