QOJ.ac

QOJ

시간 제한: 2.0 s 메모리 제한: 256 MB 총점: 100 해킹 가능 ✓

#16745. 把它做好!

통계

给定两个不同的正整数 $A$ 和 $B$,判断是否可以找到第三个正整数 $C$,使得以 $A$、$B$ 和 $C$ 为边长的三角形是一个直角三角形。请记住,如果一个三角形的其中一个角等于 90 度,则称其为直角三角形。

输入格式

输入的第一行包含两个正整数 $A$ 和 $B$:给定的两条边的长度($1 \le A < B \le 100$)。

输出格式

如果可以找到这样的整数 $C$,输出 "YES",否则输出 "NO"。

样例

输入样例 1

3 4

输出样例 1

YES

输入样例 2

1 2

输出样例 2

NO

说明

  • 在第一个样例中,我们可以取 $C = 5$。
  • 在第二个样例中,无法找到具有所需性质的整数 $C$。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.