双指针
#include<algorithm>
#include<iostream>
#include<bitset>
#include<cstdio>
#define int long long
using namespace std;
inline int rd(){
int ret=0,f=1;char c;
while(c=getchar(),!isdigit(c))f=c=='-'?-1:1;
while(isdigit(c))ret=ret*10+c-'0',c=getchar();
return ret*f;
}
int n;
signed main(){
n=rd();
int i=1,j=1,s=1;
while(i<=j){
if(i==n)break;
if(s<n){
s+=(++j);
continue;
}
if(s>n){
s-=(i++);
continue;
}
if(s==n){
if(i==j)continue;
printf("%lld %lld
",i,j);
s-=(i++);
continue;
}
}
return 0;
}