#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=5e6+10;
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin>>n;
int ok=0;
for(int i=1,j=1;i<=n/2+1&&j<=i;)
{
int x=(i+j)*(i-j+1)/2;
if(x<n)i++;
if(x>n)j++;
if(x==n)
{
if(i==j)
{
i++;
continue;
}
for(int k=j;k<=i;k++)
cout<<k<<" ";
cout<<endl;
ok=1;
i++;
}
}
if(!ok)cout<<"NONE"<<endl;
return 0;
}