You are given a positive integer x. Find any such 2 positive integers a and b such that GCD(a,b)+LCM(a,b)=x.

As a reminder, GCD(a,b) is the greatest integer that divides both a and b. Similarly, LCM(a,b) is the smallest integer such that both a and b divide it.

It's guaranteed that the solution always exists. If there are several such pairs (a, b), you can output any of them.

Input

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

Each testcase consists of one line containing a single integer, x (2 ≤ x ≤ 10^9).

Output

For each testcase, output a pair of positive integers a and b (1 ≤ a, b ≤ 10^9) such that GCD(a,b)+LCM(a,b)=x. It's guaranteed that the solution always exists. If there are several such pairs (a, b), you can output any of them.

Example

Input


2
2
14


Output


1 1
6 4

Note

In the first testcase of the sample, GCD(1,1)+LCM(1,1)=1+1=2.

In the second testcase of the sample, GCD(6,4)+LCM(6,4)=2+12=14.
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class a{
     static int[] count;
     // static int[] count1;
     static long[] arr;
     static char[] c;
     static long[] darr;
     static long x;
     static long maxl;
     // static long minl;
     static int mx = (int)1e6;
     static long mod = 998244353l;
     // static int minl = -1;
     static int n;
     static long a;
     static long b;
     // static long c;
     static long d;
     static long y;
     static int m;
     static long k;
     static String str;
     static Set<Long> set;
     static Set<Integer> list;
     static Map<Integer,List<Integer>> map;
     static StringBuilder sb;

     public static void solve(){
        sb = new StringBuilder();
        
        System.out.println("1"+" "+(x-1));

     }

     public static void main(String[] args) {

            FastScanner sc = new FastScanner();

            int t = sc.nextInt();
            while(t > 0){
                 // set = new HashSet<>();
                 // map = new HashMap<>();
                // x = sc.nextLong();
                // y = sc.nextLong();
                // a = sc.nextLong();
                // b = sc.nextLong();
                // c = sc.nextLong();
                // d = sc.nextLong();

                 // long x = sc.nextLong();

                 // maxl = Integer.MIN_VALUE;


                // n = sc.nextInt();
                 x = sc.nextLong();
                 // a = sc.nextInt();
                 // b = sc.nextInt();
                 // m = sc.nextInt();
                 // k = sc.nextLong();
                 // k = sc.nextInt();
                 // // x = sc.nextInt();
                 // c = sc.next().toCharArray();
                 // n = c.length;

                 // // // k = sc.nextInt();
                 
                // arr = new long[n];
                // for(int i = 0; i < n ; i++){
                //     arr[i] = sc.nextLong();
                // }


                //  darr = new long[n];
                //  for(int i = 0; i < n ; i++){
                //      darr[i] = sc.nextLong();
                //  }
                 // boolean flag = false;
                 // str = sc.next();

                 // x = sc.nextInt();



                // System.out.println(solve()?"Yes":"No");
                solve();
                 // System.out.println(solve());
                 // sb = new StringBuilder();
                 // sb.append(str);

                 t -= 1;
            }

     }

    public static int log(long n){
         if(n == 0)
             return 0;

         if(n == 1)
             return 0;
         if(n == 2)
             return 1;
         double num = Math.log(n);
         double den = Math.log(2);
         if(den == 0)
             return 0;
         return (int)(num/den);
     }

     public static void swap(int i,int j){
         long temp = arr[j];
         arr[j] = arr[i];
         arr[i] = temp;
     } 

    static final Random random=new Random();
    
    static void ruffleSort(long[] a) {
        int n=a.length;//shuffle, then sort 
        for (int i=0; i<n; i++) {
            int oi=random.nextInt(n);
            long temp=a[oi];
            a[oi]=a[i]; a[i]=temp;
        }
        Arrays.sort(a);
    }

     static class FastScanner {

                BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                StringTokenizer st=new StringTokenizer("");
                String next() {
                        while (!st.hasMoreTokens())
                                try {
                                        st=new StringTokenizer(br.readLine());
                                } catch (IOException e) {
                                        e.printStackTrace();
                                }
                        return st.nextToken();
                }
                
                int nextInt() {
                        return Integer.parseInt(next());
                }
                int[] readArray(int n) {
                        int[] a=new int[n];
                        for (int i=0; i<n; i++) a[i]=nextInt();
                        return a;
                }
                long nextLong() {
                        return Long.parseLong(next());
                }
        }

}