Skip to content

1787

A_Exponential_Equation

Explanation

[Explanation](https://romankurnovskii.com/en/tracks/algorithms-101/codeforces/02-combinatorics-and-geometry/1787a/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
def solve():
    n = int(input())
    if n == 2:
        print(1, 1)
    elif n % 2 == 0:
        print(1, n // 2)
    else:
        print(-1)


for _ in range(int(input())):
    solve()