Two Numbers

4

1 votes
Problem

Problem Statement

You are given a non-negative number n. Find any such two positive integers x and y such that GCD(x,y) + LCM(x,y) n

GCD (Greatest Common Divisor) of two numbers is the largest number that divides both of them. e.g GCD(12,24)=12

LCM (Least Common Multiple) is a method to find the smallest common multiple between any two or more numbers. e.g LCM(12,24)=24

Formula for LCM

It's guaranteed that the solution always exists. If there are several such pairs (x,y) you can output any of them.It is not necessary that x & y should be distinct.

Input

The first line contains a single integer (1≤t≤104)  — the number of testcases.

Each testcase consists of one line containing a single integer n (2≤n≤1018).

Output

For each testcase, output a pair of positive integers x and y (1≤x,yn) such that GCD(x,y) + LCM(x,y) = n

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?