#abc340f. F - S = 1
F - S = 1
Score: points
问题描述
给定整数 和 ,满足至少一个条件 或 。
寻找一对整数 ,满足以下所有条件。如果不存在这样的整数对,请报告。
- 在 平面上以点 为顶点的三角形面积为 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given integers and , which satisfy at least one of and .
Find a pair of integers that satisfies all of the following conditions. If no such pair exists, report so.
- The area of the triangle with vertices at points on the -plane is .
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
If there is a pair of integers that satisfies the conditions, print it in the following format:
Otherwise, print -1
.
Sample Input 1
3 5
Sample Output 1
1 1
The area of the triangle with vertices at points is . Thus, satisfies the conditions.
Sample Input 2
-2 0
Sample Output 2
0 1
Sample Input 3
8752654402832944 -6857065241301125
Sample Output 3
-1
update @ 2024/3/10 01:33:24