Contest Duration: - (local time) (100 minutes) Back to Home
F - S = 1 /

Time Limit: 2 sec / Memory Limit: 1024 MB

問題文

• -10^{18} \leq A, B \leq 10^{18}
• xy 平面上の点 (0, 0), (X, Y), (A, B) を頂点とする三角形の面積は 1

制約

• -10^{17} \leq X, Y \leq 10^{17}
• (X, Y) \neq (0, 0)
• X, Y は整数

入力

X Y


出力

A B


入力例 1

3 5


出力例 1

1 1


(0, 0), (3, 5), (1, 1) を頂点とする三角形の面積は 1 です。よって (A, B) = (1, 1) は条件を満たします。

入力例 2

-2 0


出力例 2

0 1


入力例 3

8752654402832944 -6857065241301125


出力例 3

-1


Score: 525 points

Problem Statement

You are given integers X and Y, which satisfy at least one of X \neq 0 and Y \neq 0.
Find a pair of integers (A, B) that satisfies all of the following conditions. If no such pair exists, report so.

• -10^{18} \leq A, B \leq 10^{18}
• The area of the triangle with vertices at points (0, 0), (X, Y), (A, B) on the xy-plane is 1.

Constraints

• -10^{17} \leq X, Y \leq 10^{17}
• (X, Y) \neq (0, 0)
• X and Y are integers.

Input

The input is given from Standard Input in the following format:

X Y


Output

If there is a pair of integers (A, B) that satisfies the conditions, print it in the following format:

A B


Otherwise, print -1.

Sample Input 1

3 5


Sample Output 1

1 1


The area of the triangle with vertices at points (0, 0), (3, 5), (1, 1) is 1. Thus, (A, B) = (1, 1) satisfies the conditions.

Sample Input 2

-2 0


Sample Output 2

0 1


Sample Input 3

8752654402832944 -6857065241301125


Sample Output 3

-1