#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#include <algorithm>
#include <queue>
using namespace std;
#define INF 0x3f3f3f3f
const int maxn = 150;
int main() {
int t;
scanf("%d", &t);
while (t--) {
int n;
scanf("%d", &n);
int temp = 0;
int m = sqrt(n + 0.5);
for (int i = 2; i <= m; i++) {
if (n % i == 0) {
temp = 1;
int t = i;
if (n / i > t) t = n / i;
printf("%d %d\n", t, n - t); break;
}
}
if (!temp) printf("1 %d\n", n - 1);
}
}
Codeforces B. Omkar and Last Class of Math (Round #655 Div.2)
最新推荐文章于 2021-02-24 08:35:59 发布