练20.5 点和正方形的关系
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
There is a square with the coordinates of its four corners ($x$, $y$) being ($1$, $-1$), ($1$, $1$), ($-1$, $-1$), and ($-1$, $1$), where $x$ is the horizontal axis and $y$ is the vertical axis.Write a program to determine if a given point is inside this square (including the square's boundary).
Input Format
Input a single line containing two integers $x$ and $y$, separated by a space, representing the coordinates ($x$, $y$) ($-10 \le x, y \le 10$).Output Format
Output a single line. If the point is inside the square, output "yes"; otherwise, output "no".
Sample
1 1yes
20251206 A班作业(9)
- Status
- Done
- Problem
- 5
- Open Since
- 2025-12-6 0:00
- Deadline
- 2025-12-14 23:59
- Extension
- 24 hour(s)