https://codeforces.com/problemset/problem/1285/C
题目要求的是max(a,b)尽可能的小,故考虑对n分解约数。让俩约数尽可能的接近。且满足gcd(a,b)==1
#include<bits/stdc++.h>
using namespace std;
typedef long long int LL;
LL gcd(LL a,LL b) {return b?gcd(b,a%b):a;}
LL x,y;
int main(void)
{
LL n; cin>>n;
for(int i=1;i<=n/i;i++)
{
if(n%i==0)
{
LL j=n/i;
if(gcd(i,j)==1) x=i,y=j;
}
}
cout<<x<<" "<<y<<endl;
return 0;
}