#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t;
int n;
struct num {
    int p;
    int v;
    int c;
} a[200];

bool cmp (num a, num b) {
    // if (a.c == b.c) return a.p < b.p;
    return a.v < b.v;
}

int main() {
    cin >> t;
    while(t--) {
        bool ok = false;
        int minn, maxx;
        int minpos, maxpos;
        cin >> n;
        for (int i = 1; i <= n; ++i) {
            cin >> a[i].v;
            a[i].p = i;
            a[i].c = a[i].v - a[i].p;
        }
        if (a[1].v < a[2].v) {
            minn = a[1].v;
            maxx = a[2].v;
            minpos = 1;
            maxpos = 2;
        } else {
            minn = a[2].v;
            maxx = a[1].v;
            minpos = 2;
            maxpos = 1;
        }
        if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
            puts("YES");
            ok = true;
            if (minpos < maxpos) {
                cout << minpos << " " << maxpos << endl;
            } else {
                cout << maxpos << " " << minpos << endl;
            }
        } else {
            for (int i = 3; i <= n; ++i) {
                if (ok) break;
                if (a[i].c < minn) {
                    minn = a[i].c;
                    minpos = a[i].p;
                    if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
                        puts("YES");
                        ok = true;
                        if (minpos < maxpos) {
                            cout << minpos << " " << maxpos << endl;
                        } else {
                            cout << maxpos << " " << minpos << endl;
                        }
                    }
                } else if (a[i].c == minn) {
                    if (abs(maxpos - minpos) > abs(maxpos - a[i].p)) {
                        minn = a[i].c;
                        minpos = a[i].p;
                        if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
                            puts("YES");
                            ok = true;
                            if (minpos < maxpos) {
                                cout << minpos << " " << maxpos << endl;
                            } else {
                                cout << maxpos << " " << minpos << endl;
                            }
                        }
                    }
                }
                if (a[i].c > maxx) {
                    maxx = a[i].c;
                    maxpos = a[i].p;
                    if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
                        puts("YES");
                        ok = true;
                        if (minpos < maxpos) {
                            cout << minpos << " " << maxpos << endl;
                        } else {
                            cout << maxpos << " " << minpos << endl;
                        }
                    }
                } else if (a[i].c == maxx) {
                    if (abs(maxpos - minpos) > abs(minpos - a[i].p)) {
                        maxx = a[i].c;
                        maxpos = a[i].p;
                        if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
                            puts("YES");
                            ok = true;
                            if (minpos < maxpos) {
                                cout << minpos << " " << maxpos << endl;
                            } else {
                                cout << maxpos << " " << minpos << endl;
                            }
                        }
                    }
                }
            }
            if (!ok) {
                puts("NO");
            }
        }

        // for (int i = 1; i <= n; ++i) cout << a[i].v << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].p << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].c << ' ';cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t;
int n, k1, k2;
int a[200], b[200];
vector<int> ans;
int main() {
    cin >> t;
    while(t--) {
        int minn = 2e9;
        int maxx = 0;
        int maxpos = -1;
        int minpos = -1;
        cin >> n;
        for (int i = 0; i < n; ++i) {
            cin >> a[i];
            if (minn > a[i]) {
                minn = a[i];
                minpos = i;
            }
            if (maxx < a[i]) {
                maxx = a[i];
                maxpos = i;
            }
        }
        if (maxx - minn >= n) {
            puts("YES");
            cout << 1 << " " << n << endl;
        } else {
            puts("NO");
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t;
int n;
int a[20000];

int main() {
    cin >> t;
    while(t--) {
        bool ok = false;
        int minn, maxx;
        int minpos, maxpos;
        cin >> n;
        for (int i = 1; i <= n; ++i) {
            cin >> a[i];
        }
        for (int i = 1; i <= n - 1; ++i) {
            if (abs(a[i] - a[i + 1]) >= 2) {
                ok = true;
                break;
            }
        }

        if (!ok) {
            puts("NO");
        } else {
            puts("YES");
        }

        // for (int i = 1; i <= n; ++i) cout << a[i].v << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].p << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].c << ' ';cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t;
int n;
struct num {
    int p;
    int v;
    int c;
} a[200];

bool cmp (num a, num b) {
    if (a.c == b.c) return a.p < b.p;
    return a.c < b.c;
}

int main() {
    cin >> t;
    while(t--) {
        ll minn = 2e11;
        ll maxx = -2e11;
        int maxpos = -1;
        int minpos = -1;
        cin >> n;
        for (int i = 1; i <= n; ++i) {
            cin >> a[i].v;
            a[i].p = i;
            a[i].c = a[i].v - a[i].p;
        }
        sort(a + 1, a + n + 1, cmp);
        for (int i = 1; i <= n; ++i) cout << a[i].v << ' ';cout << endl;
        for (int i = 1; i <= n; ++i) cout << a[i].p << ' ';cout << endl;
        for (int i = 1; i <= n; ++i) cout << a[i].c << ' ';cout << endl;
        if (a[n].c - a[1].c > 0 && a[n].p > a[1].p) {
            puts("YES");
            maxpos = a[n].p;
            minpos = a[1].p;
            if (minpos < maxpos) {
                cout << minpos << " " << maxpos << endl;
            } else {
                cout << maxpos << " " << minpos << endl;
            }

        } else {
            puts("NO");
        }
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t;
int n;
int a[20000];

int main() {
    cin >> t;
    while(t--) {
        bool ok = false;
        int minn, maxx;
        int minpos, maxpos;
        cin >> n;
        for (int i = 1; i <= n; ++i) {
            cin >> a[i];
        }
        for (int i = 1; i <= n - 1; ++i) {
            if (abs(a[i] - a[i + 1]) >= 2) {
                ok = true;
                break;
            }
        }

        if (!ok) {
            puts("NO");
        } else {
            puts("YES");
        }
        }

        // for (int i = 1; i <= n; ++i) cout << a[i].v << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].p << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].c << ' ';cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int t;
int n;
struct num {
    int p;
    int v;
    int c;
} a[200];

bool cmp (num a, num b) {
    // if (a.c == b.c) return a.p < b.p;
    return a.v < b.v;
}

int main() {
    cin >> t;
    while(t--) {
        bool ok = false;
        int minn, maxx;
        int minpos, maxpos;
        cin >> n;
        for (int i = 1; i <= n; ++i) {
            cin >> a[i].v;
            a[i].p = i;
            a[i].c = a[i].v - a[i].p;
        }
        if (a[1].v < a[2].v) {
            minn = a[1].v;
            maxx = a[2].v;
            minpos = 1;
            maxpos = 2;
        } else {
            minn = a[2].v;
            maxx = a[1].v;
            minpos = 2;
            maxpos = 1;
        }
        if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
            puts("YES");
            ok = true;
            if (minpos < maxpos) {
                cout << minpos << " " << maxpos << endl;
            } else {
                cout << maxpos << " " << minpos << endl;
            }
        } else {
            for (int i = 3; i <= n; ++i) {
                if (ok) break;
                if (a[i].c < minn) {
                    minn = a[i].c;
                    minpos = a[i].p;
                    if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
                        puts("YES");
                        ok = true;
                        if (minpos < maxpos) {
                            cout << minpos << " " << maxpos << endl;
                        } else {
                            cout << maxpos << " " << minpos << endl;
                        }
                    }
                } else if (a[i].c > maxx) {
                    maxx = a[i].c;
                    maxpos = a[i].p;
                    if (abs(a[maxpos].c - a[minpos].c) >= abs(maxpos - minpos)) {
                        puts("YES");
                        ok = true;
                        if (minpos < maxpos) {
                            cout << minpos << " " << maxpos << endl;
                        } else {
                            cout << maxpos << " " << minpos << endl;
                        }
                    }
                }
            }
            if (!ok) {
                puts("NO");
            }
        }

        // for (int i = 1; i <= n; ++i) cout << a[i].v << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].p << ' ';cout << endl;
        // for (int i = 1; i <= n; ++i) cout << a[i].c << ' ';cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<ll>v(n);
		for(auto i=0;i<n;i++)
		{
			cin>>v[i];
		}
		ll c=0;
		for(auto i=0;i<n-1;i++)
		{
			if(v[i+1]-v[i]>=2)
			{
				cout<<"YES"<<endl;
				cout<<i<<" "<<i+1<<endl;
				c++;
				break;
			}
		}
		if(c==0)
		{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<pair<ll,ll>>v;
		for(auto i=0;i<n;i++)
		{
			cin>>x;
			v.pb({x,i+1});
		}
		sort(v.begin(),v.end());
		for(auto i=0;i<n-1;i++)
		{
			auto dif=v[n-1].fr-v[i].fr;
			auto dif_ind=v[i].sc-v[n-1].sc;
			//cout<<dif<<" "<<abs(dif_ind)<<endl;
			if(dif>=n&& abs(dif)>abs(dif_ind))
			{
				cout<<"YES"<<endl;
				cout<<min(v[i].sc,v[n-1].sc)<<" "<<max(v[i].sc,v[n-1].sc)<<endl;
				break;
			}
			else if(dif<n)
			{
				cout<<"NO"<<endl;
				break;
			}
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<ll>v(n);
		for(auto i=0;i<n;i++)
		{
			cin>>v[i];
		}
		ll c=0;
		for(auto i=0;i<n-1;i++)
		{
			if(abs(v[i+1]-v[i])>=2)
			{
				cout<<"YES"<<endl;
				cout<<i<<" "<<i+1<<endl;
				c++;
				break;
			}
		}
		if(c==0)
		{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<pair<ll,ll>>v;
		for(auto i=0;i<n;i++)
		{
			cin>>x;
			v.pb({x,i+1});
		}
		sort(v.begin(),v.end());
		for(auto i=0;i<n;i++)
		{
			auto dif=v[n-1].fr-v[i].fr;
			auto dif_ind=v[i].sc-v[n-1].sc;
		//	cout<<dif<<" "<<dif_ind<<endl;
			if(dif>=n&& abs(dif_ind)>2)
			{
				cout<<"YES"<<endl;
				cout<<min(v[i].sc,v[n-1].sc)<<" "<<max(v[i].sc,v[n-1].sc)<<endl;
				break;
			}
			else if(dif<n)
			{
				cout<<"NO"<<endl;
				break;
			}
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<ll>v(n);
		for(auto i=0;i<n;i++)
		{
			cin>>v[i];
		}
		ll c=0;
		for(auto i=0;i<n-1;i++)
		{
			if(abs(v[i+1]-v[i])>1)
			{
				cout<<"YES"<<endl;
				cout<<i+1<<" "<<i+2<<endl;
				c++;
				break;
			}
		}
		if(c==0)
		{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<pair<ll,ll>>v;
		for(auto i=0;i<n;i++)
		{
			cin>>x;
			v.pb({x,i+1});
		}
		sort(v.begin(),v.end());
		for(auto i=0;i<n-1;i++)
		{
			auto dif=v[n-1].fr-v[i].fr;
			auto dif_ind=v[i].sc-v[n-1].sc;
			//cout<<dif<<" "<<abs(dif_ind)<<endl;
			if(dif>=n&& abs(dif_ind)>0)
			{
				cout<<"YES"<<endl;
				cout<<min(v[i].sc,v[n-1].sc)<<" "<<max(v[i].sc,v[n-1].sc)<<endl;
				break;
			}
			else if(dif<n)
			{
				cout<<"NO"<<endl;
				break;
			}
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<ll>v(n);
		for(auto i=0;i<n;i++)
		{
			cin>>v[i];
		}
		ll c=0;
		for(auto i=0;i<n-1;i++)
		{
			if(abs(v[i+1]-v[i])>1)
			{
				cout<<"YES"<<endl;
				cout<<i<<" "<<i+1<<endl;
				c++;
				break;
			}
		}
		if(c==0)
		{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<pair<ll,ll>>v;
		for(auto i=0;i<n;i++)
		{
			cin>>x;
			v.pb({x,i+1});
		}
		sort(v.begin(),v.end());
		for(auto i=0;i<n;i++)
		{
			auto dif=v[n-1].fr-v[i].fr;
			auto dif_ind=v[i].sc-v[n-1].sc;
		//	cout<<dif<<" "<<dif_ind<<endl;
			if(dif>=n&& abs(dif_ind)!=0)
			{
				cout<<"YES"<<endl;
				cout<<min(v[i].sc,v[n-1].sc)<<" "<<max(v[i].sc,v[n-1].sc)<<endl;
				break;
			}
			else if(dif<n)
			{
				cout<<"NO"<<endl;
				break;
			}
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<pair<ll,ll>>v;
		for(auto i=0;i<n;i++)
		{
			cin>>x;
			v.pb({x,i+1});
		}
		sort(v.begin(),v.end());
		for(auto i=0;i<n-1;i++)
		{
			auto dif=v[n-1].fr-v[i].fr;
			auto dif_ind=v[i].sc-v[n-1].sc;
			//cout<<dif<<" "<<abs(dif_ind)<<endl;
			if(dif>=n&& abs(dif)>(n-i))
			{
				cout<<"YES"<<endl;
				cout<<min(v[i].sc,v[n-1].sc)<<" "<<max(v[i].sc,v[n-1].sc)<<endl;
				break;
			}
			else if(dif<n)
			{
				cout<<"NO"<<endl;
				break;
			}
		}
	}

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
typedef long long ll;
#define test ll t;cin>>t;while(t--)
#define input(a,b) vector<ll>v(b);for(auto i=a;i<b;i++)cin>>v[i]
#define fr first
#define sc second
#define pb push_back
#define pp pop_back
typedef vector<ll> vi;
typedef vector<vi> vii;
typedef unordered_map<ll,ll> mpp;
typedef pair<ll,ll> ii;

int32_t main()
{
	fast;
	test
	{
		ll n,x;
		cin>>n;
		vector<pair<ll,ll>>v;
		for(auto i=0;i<n;i++)
		{
			cin>>x;
			v.pb({x,i+1});
		}
		sort(v.begin(),v.end());
		for(auto i=0;i<n;i++)
		{
			auto dif=v[n-1].fr-v[i].fr;
			auto dif_ind=v[i].sc-v[n-1].sc;
		//	cout<<dif<<" "<<dif_ind<<endl;
			if(dif>=n&& abs(dif_ind)>1)
			{
				cout<<"YES"<<endl;
				cout<<min(v[i].sc,v[n-1].sc)<<" "<<max(v[i].sc,v[n-1].sc)<<endl;
				break;
			}
			else if(dif<n)
			{
				cout<<"NO"<<endl;
				break;
			}
		}
	}

	return 0;
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}

int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,p=0,Max,Min;
	              V<ll> a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(x);
	              }

	            for(i=0;i<n&&p!=1;i++)
	             {
	                    Max=a[i],Min=a[i];
	                    for(j=i+1;j<n;j++)
	                    {
	                           Max=max(Max,a[j]);
	                           Min=min(Min,a[j]);
	                           if(Max-Min>=j-i+1)
	                           {
	                           cout<<"YES"<<endl;
	                           cout<<i+1<<" "<<j+1<<endl,p=1;
	                           break;
	                           }
	                    }
	             }

	              if(p==0)
	              cout<<"NO"<<endl;

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
ll i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,max,min;
	              Vp a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(mp(x,i+1));
	              }
	              sort(a.begin(),a.end());

	              if(a[a.size()-1].ff-a[0].ff<n)
	              cout<<"NO"<<endl;
	              else
	              {
	                    cout<<"YES"<<endl;
	                    cout<<a[0].ss<<" "<<a[a.size()-1].ss<<endl;
	              }

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
ll i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n;
	              Vp a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(mp(x,i+1));
	              }
	              sort(a.begin(),a.end());

	              if((a[a.size()-1].ff-a[0].ff)<n)
	              cout<<"NO"<<endl;
	              else
	              {
	                    cout<<"YES"<<endl;
	                    cout<<1<<" "<<n<<endl;
	              }

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,p=0;
	              V<ll> a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(x);
	              }

	              for(i=0;i<=a.size()&&p!=1;i++)
	              {
	                     for(j=i+1;j<=a.size();j++)
	                     {
	                    // cout<<*max_element(a.begin()+i, a.begin()+j)<<" "<<*min_element(a.begin()+i, a.begin()+j)<<" "<<j-i<<endl;
	                     if(*max_element(a.begin()+i,a.begin()+j)-*min_element(a.begin()+i, a.begin()+j)>=j-i)
	                     {
	                     cout<<"YES"<<endl;
	                     cout<<i+1<<" "<<j<<endl;
	                     p=1;
	                     break;
	                     }

	                     }

	              }
	              if(p==0)
	              cout<<"NO"<<endl;

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,p=0;
	              V<ll> a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(x);
	              }

	              for(i=0;i<=a.size()&&p!=1;i++)
	              {
	                     for(j=i;j<=a.size();j++)
	                     {
	                   //  cout<<*max_element(a.begin()+i, a.begin()+j)<<" "<<*min_element(a.begin()+i, a.begin()+j)<<" "<<j-i+1<<endl;
	                     if(*max_element(a.begin()+i,a.begin()+j)-*min_element(a.begin()+i, a.begin()+j)>=j-i+1)
	                     {
	                     cout<<"YES"<<endl;
	                     cout<<i+1<<" "<<j<<endl;
	                     p=1;
	                     break;
	                     }

	                     }

	              }
	              if(p==0)
	              cout<<"NO"<<endl;

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y,k;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}

int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              int n,p=0,Max=0,Min=10e9,q=0;
	              M<ll,ll> a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a[x]=i;
	              Max=max(x,Max);
	              Min=min(x,Min);
	              if(Max-Min>=a[Max]-a[Min]+1)
	              p=a[Max]+1,q=a[Min]+1;
	              }
	              if(p==0&&q==0)
	              cout<<"NO"<<endl;
	              else
	              {
	              cout<<"YES"<<endl;
	              cout<<min(p,q)<<" "<<max(p,q)<<endl;}

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,p=0;
	              V<ll> a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(x);
	              }

	              for(i=0;i<a.size()&&p!=1;i++)
	              {
	                     for(j=i;j<=a.size();j++)
	                     {
	                   //  cout<<*max_element(a.begin()+i, a.begin()+j)<<" "<<*min_element(a.begin()+i, a.begin()+j)<<" "<<j-i+1<<endl;
	                     if(*max_element(a.begin()+i, a.begin()+j)-*min_element(a.begin()+i, a.begin()+j)>=j-i+1)
	                     {
	                     cout<<"YES"<<endl;
	                     cout<<i+1<<" "<<j<<endl;
	                     p=1;
	                     break;
	                     }

	                     }

	              }
	              if(p==0)
	              cout<<"NO"<<endl;

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,p=0;
	              V<ll> a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(x);
	              }

	              ll dpmax[n+1][n+1];
	              ll dpmin[n+1][n+1];
	             for(i=0;i<=n;i++)
	             {
	                    for(j=0;j<=n;j++)
	                    {
	                           if((i==j)&&(i==0))
	                           dpmax[i][j]=0,dpmin[i][j]=0;
	                           else if(i!=j)
	                           {
	                           dpmax[i][j]=0;
	                           dpmin[i][j]=0;
	                           }
	                           else
	                           {
	                                  dpmax[i][j]=dpmin[i][j]=a[i-1];

	                           }
	                    }
	             }
	            for(i=1;i<=n&&p!=1;i++)
	             {
	                    for(j=i+1;j<=n;j++)
	                    {
	                           dpmax[i][j]=max(dpmax[i][j-1],a[j-1]);
	                           dpmin[i][j]=min(dpmin[i][j-1],a[j-1]);
	                           if(dpmax[i][j]-dpmin[i][j]>=j-i+1)
	                           {
	                           cout<<"YES"<<endl;
	                           cout<<i<<" "<<j<<endl,p=1;
	                           break;
	                           }
	                    }
	             }

	              if(p==0)
	              cout<<"NO"<<endl;

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
ll i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n,p=0;
	              Vp a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(mp(x,i+1));
	              }
	              sort(a.begin(),a.end());

	              for(i=0,j=a.size()-1;i<a.size(),j>=0;i++,j--)
	              {
	                     if(i>j)
	                     break;
	                     if(a[j].ff-a[i].ff>=abs(a[j].ss-a[i].ss+1))
	                     {
	                     cout<<"YES"<<endl;
	                     cout<<min(a[i].ss,a[j].ss)<<" "<<max(a[i].ss,a[j].ss)<<endl;
	                     p=1;
	                     break;
	                     }

	              }
	              if(p==0)
	              cout<<"NO"<<endl;

	       }
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
int i,j,x,y,k;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}

int main(){
	int t;
	cin>>t;
	while(t--){
		int n, prev=0, l=-1, r, cur;
		cin>>n;
		cin>>prev;
		for(int i =1;i<n;++i){
			cin>>cur;
			if(abs(cur-prev)>=2){
				l=i;
				r=i+1;
			}
			prev=cur;
		}
		if(l==-1)cout<<"NO\n";
		else cout<<"YES\n"<<l<<" "<<r<<"\n";
	}
}


/* Tulsi Shah */
#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define ff first
#define ss second
#define forr(z,y) for(int i=z;i<y;i++)
#define rfor(z,y) for(int i=z;i>=y;i--)
#define  Vp vector<pair<ll,ll>>
#define V vector
#define M map
const int mod=1e9+7;
const int nax=1e5+10;
vector< int> tree(4*nax);
ll i,j,x,y;
bool sortbysec(const pair<ll,ll> &a,const pair<ll,ll> &b)
{
    return (a.second <b.second);
}
int main()
{
	FAST
	       ll t;
	       cin>>t;
	       while(t--)
	       {
	              ll n;
	              Vp a;
	              cin>>n;

	              forr(0,n)
	              {
	              cin>>x;
	              a.pb(mp(x,i+1));
	              }
	              sort(a.begin(),a.end());

	              if(a[a.size()-1].ff-a[0].ff<n)
	              cout<<"NO"<<endl;
	              else
	              {
	                    cout<<"YES"<<endl;
	                    if(a[0].ss<a[a.size()-1].ss)
	                    cout<<a[0].ss<<" "<<a[a.size()-1].ss<<endl;
	                    else
	                    cout<<a[a.size()-1].ss<<" "<<a[0].ss<<endl;
	              }

	       }
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={arr[0],0};
	REP(i,n){
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}
	reverse(ALL(arr));
	mx1={arr[0],0};
	REP(i,n){
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={arr[0],0};
	REP(i,n){
		if(arr[i]>mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}
	reverse(ALL(arr));
	mx1={arr[0],0};
	REP(i,n){
		if(arr[i]>mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}
	mx1={-1,0};
	FORD(i,n-1,0){
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	REP(i,n){
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	FORD(i,n-1,0){
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST-(i-mx1.ND)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={-1,0};
	FORD(i,n-1,0){
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST-(mx1.ND-i)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	REP(i,n){
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST+(i-mx1.ND)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	FORD(i,n-1,0){
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST+(mx1.ND-i)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}
	mx1={-1,0};
	FORD(i,n-1,0){
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	REP(i,n){
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]<mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	FORD(i,n-1,0){
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]<mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={-1,0};
	FORD(i,n-1,0){
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={arr[0],0};
	REP(i,n){
		if(arr[i]>mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={arr[0],0};
	REP(i,n){
		if(arr[i]>mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}
	reverse(ALL(arr));
	mx1={-1,0};
	REP(i,n){
		if(arr[i]>=mx1.ST){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS
void go(){

	int n;
	cin>>n;
	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST-(i-mx1.ND)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={-1,0};
	FORD(i,n-1,0){
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST-(mx1.ND-i)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	REP(i,n){
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST-(i-mx1.ND)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	FORD(i,n-1,0){
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST-(mx1.ND-i)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";

}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();

	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef pair<int,int> PI;
typedef vector<LL> VL;
typedef vector<VL> VLL;
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS

void go(){

	int n;
	cin>>n;

	VI arr(n);
	REP(i,n)
		cin>>arr[i];

	PI mx1={-1,0};
	REP(i,n){
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST-(i-mx1.ND)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={-1,n};
	FORD(i,n-1,0){
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]>=mx1.ST-(mx1.ND-i)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(mx1.ST-arr[i]>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	mx1={INF,0};
	REP(i,n){
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST+(i-mx1.ND)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>i-mx1.ND){
			cout<<"YES\n"<<mx1.ND+1<<" "<<i+1<<"\n";
			return;
		}
	}

	mx1={INF,n};
	FORD(i,n-1,0){
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
		if(arr[i]<=mx1.ST+(mx1.ND-i)){
			mx1.ST=arr[i];
			mx1.ND=i;
		}
		if(arr[i]-mx1.ST>mx1.ND-i){
			cout<<"YES\n"<<i+1<<" "<<mx1.ND+1<<"\n";
			return;
		}
	}

	cout<<"NO\n";
}

int main(){

	ios::sync_with_stdio(0); cin.tie(0);
	int t;
	cin>>t;
	while(t--)
		go();
	return 0;

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = 0;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
        }
        for(ll i = 1;i<n;i++){
            if(ar[i]- ar[i-1]> 2){
                index = i;
            }
        }
        if((mx - mn) >= n){
            cout<<"YES"<<"\n";
            cout<<index+1<<" "<<index+2<<"\n";
        }
        else{
            cout<<"NO"<<"\n";
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = 0;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
            mx = max(mx,ar[i]);
            mn = min(mn,ar[i]);
        }
        if((mx - mn) >= n){
            cout<<"YES"<<"\n";
            cout<<"1 "<<n<<"\n";
        }
        else{
            printf("NO\n");
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = -1;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
        }
        for(ll i = 1;i<n;i++){
            if(abs(ar[i]- ar[i-1])>= 2){
                index = i-1;
                break;
            }
        }
        if(index != -1){
            cout<<"YES"<<"\n";
            cout<<index+1<<" "<<index+2<<"\n";
        }
        else{
            cout<<"NO"<<"\n";
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = -1;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
        }
        for(ll i = 1;i<n;i++){
            if(abs(ar[i]- ar[i-1])> 2){
                index = i;
            }
        }
        if(index != -1){
            cout<<"YES"<<"\n";
            cout<<index+1<<" "<<index+2<<"\n";
        }
        else{
            cout<<"NO"<<"\n";
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = 0;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
            mx = max(mx,ar[i]);
            mn = min(mn,ar[i]);
        }
        if((mx - mn) >= n){
            cout<<"YES"<<"\n";
            cout<<"1 "<<n<<"\n";
        }
        else{
            cout<<"NO"<<"\n";
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = -1;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
        }
        for(ll i = 1;i<n;i++){
            if(abs(ar[i]- ar[i-1])>= 2){
                index = i;
            }
        }
        if(index != -1){
            cout<<"YES"<<"\n";
            cout<<index+1<<" "<<index+2<<"\n";
        }
        else{
            cout<<"NO"<<"\n";
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        ll index = 0;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
        }
        for(ll i = 1;i<n;i++){
            if(abs(ar[i]- ar[i-1])> 2){
                index = i;
            }
        }
        if((mx - mn) >= n){
            cout<<"YES"<<"\n";
            cout<<index+1<<" "<<index+2<<"\n";
        }
        else{
            cout<<"NO"<<"\n";
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    int t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        bool found = false;
        int index = 0;
        for(int i = 0;i<n;i++){
            cin>>ar[i];
            if(!found){
                if(ar[i] > mx) mx = ar[i];
                if(ar[i] < mn) mn = ar[i];
                if(mx - mn >= n) {found = true; index = i;}
            }
        }
        if(found){

            printf("YES\n");
            printf("1 %d\n",index+1);
        }
        else{
            printf("NO\n");
        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    int t,n;
    scanf("%d",&t);
    vector <ll> ar;
    while(t--){
        scanf("%d",&n);
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        bool found = false;
        int index = 0;
        for(int i = 0;i<n;i++){
            scanf("%lld",&ar[i]);
            if(ar[i] > mx) mx = ar[i];
            if(ar[i] < mn) mn = ar[i];
            if(mx - mn >= n) {found = true; index = i; break;}
        }
        if(found){

            printf("YES\n");
            printf("1 %d\n",index+1);
        }
        else{
            printf("NO\n");

        }

    }

}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    ll t,n;
    cin>>t;
    vector <ll> ar;
    while(t--){
        cin>>n;
        ar.resize(n);
        ll mn = 1e15, mx = -5;
        bool found = false;
        ll index = 0;
        for(ll i = 0;i<n;i++){
            cin>>ar[i];
            if(!found){
                if(ar[i] > mx) mx = ar[i];
                if(ar[i] < mn) mn = ar[i];
                if((mx - mn) >= n) {found = true; index = i;}
            }
        }
        if(found){

            printf("YES\n");
            printf("1 %lld\n",index+1);
        }
        else{
            printf("NO\n");
        }

    }

}


#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    ll test,n,i,j,k=1;
    pair<ll,ll>p;
    cin>>test;
    while(test--){
            //cout<<"test case : "<<k++<<endl;
   int yes =0,low=0,high=0;
    cin>>n;
    vector<ll>elements(n);
    vector< pair<ll,ll> >v;
    for(i=0;i<n;i++)
        cin>>elements[i];

        p.first = p.second = elements[0];
     v.push_back(p);
    for(i=1;i<n;i++)
    {
        if(elements[i]>p.first)
            p.first = elements[i];
        if(elements[i]<p.second)
            p.second = elements[i];
        v.push_back(p);
    }

    for(i=0;i<n;i++)
    {
        if( abs(v[i].first - v[i].second) >= (i+1)){
            cout<<"YES"<<endl;

         for(j=0;j<n;j++){
                if(v[i].second==elements[j] && low==0){
                cout<<j+1<<" "; yes++;   low = 1;         }
                else if(v[i].first==elements[j] && high==0){
                    cout<<j+1<<" "; yes++;   high=1;    }

                if(yes==2)
                    break;

         }
                if(yes==2){
                        cout<<endl;
                    break;
                }
        }
    }
     if(yes==0)
        cout<<"NO"<<endl;

    }

}


#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
#include<map>
#include<string>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<cmath>
#include<ctype.h>
#include<deque>
#include<list>
#include<set>
#define INF 999999999
#define NEG -999999999
#define pi acos(-1.0)
#define LL long long int
#define LU unsigned long long int
#define EPS 1e-9
#define MOD 100000007
#define mem(a) memset(a,0,sizeof(a))

using namespace std;
int n,m,i,j,k,l,a[1000009],b[1000009],p[1000009],ans,cn,t,x,y,z,mx,mn,s;
char c[1000009],d[1000009],ch;
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    while(scanf("%d %d",&n,&k)!=EOF)
    {
        for(i=1;i<=n;i++)
        {
            if(i!=1)
            {
                printf(" %d",i);
            }
            else
            {
                printf("%d",i);
            }
        }
        printf("\n");
    }
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main ()
{
  //  printf("%d",0%2);
    int n ,k;
    int arr[100005];
    memset(arr,0,sizeof arr);
    scanf ("%d %d",&n,&k);
    if (k!=0)
    {
        arr[k]=k+1;
        arr[k+1]=k;
    }
    for (int i=1;i<=n;i++)
    {
        if ((i==k||i==k+1)&&k!=0)  continue;
        arr[i]=i;
    }
    for(int i=1;i<=n;i++)
    {
        printf("%d",arr[i]);
        if (i!=n)   printf(" ");
    }
}


#include<stdio.h>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<stdlib.h>
#include<math.h>
using namespace std;
bool vis [100001];
int main ()
{
    int n ,k;
    int arr[100001];
    memset(arr,0,sizeof arr);
    scanf ("%d %d",&n,&k);
    k--;
    arr[k]=2;
    arr[k+1]=1;

    int per=3;
    if (k==-1)  {
        arr[k]=0;
        arr[k+1]=0;
        per=1;
    }
    for (int i=0;i<n;i++)
    {
        if (arr[i]!=0)continue;
        arr[i]=per;
        per++;
    }
    for(int i=0;i<n;i++)
        printf("%d ",arr[i]);

}


#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include <stdlib.h>
#include <iostream>
#include<ctype.h>
//#include<alloc.h>
using namespace std;
int main()
{
    int arr[100001];
    int n,k;
    scanf ("%d %d",&n,&k);
    int per;
    per=k+1;
    while (per!=0)
    {
        printf("%d ",per);
        per--;
    }
    per=k+2;
    while (per!=n+1)
    {
        printf("%d ",per);
        per++;
    }
}


#include<stdio.h>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main ()
{
    int n ,k;
    int arr[100001];
    int per=1;
    memset(arr,0,sizeof arr);
    scanf ("%d %d",&n,&k);
    k--;
    if (k!=-1)
    {
        arr[k]=2;
        arr[k+1]=1;
        per=3;
    }
    for (int i=0;i<n;i++)
    {
        if (arr[i]!=0)continue;
        arr[i]=per;
        per++;
    }
    for(int i=0;i<n;i++)
        printf("%d ",arr[i]);

}


#include<stdio.h>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main ()
{
    int n,k;
  //  printf("sss");
    scanf ("%d %d",&n,&k);
 //   printf("\n");
    for (int i=1;i<=n;i++)
    {
        if (i==k){
            printf("%d ",k+1);
            continue;
        }
        else if (i==k+1)
        {
            printf("%d ",k);
            continue;
        }
        printf("%d ",i);
    }
}


#include<stdio.h>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main ()
{
    int n,k;
    int per=3;
    scanf ("%d %d",&n,&k);
    if (k==0)   per=1;
    for (int i=1;i<=n;i++)
    {
        if (i==k){
            printf("2 ",k+1);
            continue;
        }
        else if (i==k+1&&k!=0)
        {
            printf("1 ",k);
            continue;
        }
        printf("%d ",per);
        per++;
    }
}


#include<stdio.h>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<string>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main ()
{
    int n ,k;
    int arr[100005];
    int per;
    memset(arr,0,sizeof arr);
    scanf ("%d %d",&n,&k);
    if (k!=0)
    {
        arr[k]=k+1;
        arr[k+1]=k;
    }
    for (int i=1;i<=n;i++)
    {
        if ((i==k||i==k+1)&&k!=0)  continue;
        arr[i]=i;
    }
    for(int i=1;i<=n;i++)
        printf("%d ",arr[i]);
}


/*
 * solution_by_Dyrus
 * Task_XXX
 */

# include <iostream>
# include <cstdio>
# include <string>
# include <vector>
# include <map>
# include <cmath>
# include <algorithm>
# include <cstring>

using namespace std;

int main()
{
    int n,k,t=1;
    cin >> n >> k;
    int ar[n];

    for(int i=0; i<n; i++)
        ar[i] = i+1 ;

    for(int i=0; i<k; i++)
    {
        if(t>n)
            break;
        cout << ar[i] << " ";
        t++;
        if(t>n)
            break;
        cout << ar [n-i-1] << " " ;
        t++;
        if(t>n)
            break;

    }
    for(int i=k ; i<n-k; i++)
        cout << ar[i] << " ";

}


/*
 * solution_by_Dyrus
 * Task_XXX
 */

# include <iostream>
# include <cstdio>
# include <string>
# include <vector>
# include <map>
# include <cmath>
# include <algorithm>
# include <cstring>

using namespace std;

int main()
{
    int n,k;
    cin >> n >> k;
    int ar[n];

    for(int i=0; i<n; i++)
        ar[i] = i+1 ;

    for(int i=0; i<k; i++)
        cout << ar[i] <<" "<< ar [n-i-1] << " " ;
    for(int i=k ; i<n-k;i++)
        cout << ar[i] << " ";

}


/*
 * solution_by_Dyrus
 * Task_XXX
 */

# include <iostream>
# include <cstdio>
# include <string>
# include <vector>
# include <map>
# include <cmath>
# include <algorithm>
# include <cstring>

using namespace std;
int n,k;

int main()
{
    for(int i=k+1; i>=1; i--)
        cout << i << " ";
    for(int i=k+2; i<=n; i++)
        cout << i << " ";
}


#include <cstdio>

using namespace std;

int n,k;

int main()
{
    scanf("%d%d",&n,&k);
    for(int i=k+1;i>=1;i--)
        printf("%d ",i);
    for(int i=k+2;i<=n;i++)
        printf("%d ",i);
}


/*
 * solution_by_Dyrus
 * Task_XXX
 */

# include <iostream>
# include <cstdio>
# include <string>
# include <vector>
# include <map>
# include <cmath>
# include <algorithm>
# include <cstring>

using namespace std;

int main()
{
    int n,k,t=1;
    cin >> n >> k;
    int ar[n];

    for(int i=0; i<n; i++)
        ar[i] = i+1 ;

    for(int i=0; i<k; i++)
    {
        if(t>n)
            break;
        cout << ar[i] << " ";
        t++;
        if(t>n)
            break;
        cout << ar [n-i-1] << " " ;
        t++;
        if(t>n)
            break;

    }
    cout << "bok";
    for(int i=k ; i<n-k; i++)
        cout << ar[i] << " ";

}


/*
 * solution_by_Dyrus
 * Task_XXX
 */

# include <iostream>
# include <cstdio>
# include <string>
# include <vector>
# include <map>
# include <cmath>
# include <algorithm>
# include <cstring>

using namespace std;

int main()
{
    int n,k;
    cin >> n >> k;
    int ar[n];

    for(int i=0;i<n;i++)
        ar[i] = i+1 ;

    for(int i=1;i<=n;i++)
    {
        for(int j=0;j<k;j++)
            swap (ar[j],ar[j+1]);

    }
     for(int i=0;i<n;i++)
        cout << ar[i] << " ";
}


#include <iostream>
#include <algorithm>
using namespace std;
int a,b,c[100005],d,i,j;
main () {
cin>>a>>b;
for(i=1;i<=a;i++){
c[i]=i;
reverse(c+1,c+b+2);}
for(i=1;i<=a;i++){
if(a==2 && b==1) {cout<<"1 2";return 0;}
if(a==2 && b==0) {cout<<"2 1";return 0;}
else
cout<<c[i]<<" ";}
}


#include <iostream>
#include <algorithm>
using namespace std;
int a,b,c[100005],d,i,j;
main () {
cin>>a>>b;
for(i=1;i<=a;i++){
c[i]=i;
reverse(c+1,c+b+2);}
for(i=1;i<=a;i++){
if(a==2 && b==1) {cout<<"2 1";return 0;}
if(a==2 && b==0) {cout<<"1 2";return 0;}
else
cout<<c[i]<<" ";}
system("PAUSE");
}


#include <iostream>
#include <algorithm>
using namespace std;
int a,b,c[100005],d,i,j;
main () {
cin>>a>>b;
for(i=1;i<=a;i++){
c[i]=i;
reverse(c+1,c+b+2);}
for(i=1;i<=a;i++){
if(a==2 && b==1) {cout<<"2 1";return 0;}
if(a==2 && b==0) {cout<<"1 2";return 0;}
else
cout<<c[i]<<" ";}
}


#include <iostream>
#include <algorithm>
using namespace std;
int a,b,c[100005],d,i,j;
main () {
cin>>a>>b;
for(i=1;i<=a;i++){
c[i]=i;
reverse(c+1,c+b+2);}
for(i=1;i<=a;i++){
cout<<c[i]<<" ";}
//system("PAUSE");
}


#include <iostream>
#include <algorithm>
using namespace std;
int a,b,c[100005],d,i,j;
main () {
cin>>a>>b;
for(i=1;i<=a;i++){
c[i]=i;}
reverse(c+1,c+b+2);
for(i=1;i<=a;i++){
//if(a==2 && b==1) {cout<<"2 1";return 0;}
//if(a==2 && b==0) {cout<<"1 2";return 0;}
//else
cout<<c[i]<<" ";}
//system("PAUSE");
}


#include<iostream>
using namespace std;
#define MAX 10010
int main()
{
int count=0,temp;

int list[MAX],list1[MAX];
for(int i=1;i<MAX;++i) {
		list[i]=i;
		list1[i]=i;
		}

int n,k;
cin>>n>>k;
if(n-k==1) {
		//display in opposite order
		for(int i=n;i>=1;--i)
			{  cout<<list1[i]<<" " ;
			}
	return 0;
}

for(int i=1;i<n;i+=2) {
		if(k==0) break;
	/*	if(i>=n) {
			//swap first and last element
			temp=list[n];
			list[1]=list[n];
			list[n]=temp;
			++count; }
			else { */
		temp=list[i];

		list[i]=list[i+1];
		list[i+1]=temp;
		++ count;
// }
		if(count==k) break;
}
for(int i=1;i<=n;++i) {
		cout<<list[i]<<" ";
		}
return 0;
}


#include<iostream>
using namespace std;
#define MAX 100010
int main()
{
int count=0,temp;

int list[MAX];
for(int i=1;i<MAX;++i) {
		list[i]=i;

		}

int n,k;
cin>>n>>k;
if(n-k==1) {
				for(int i=n;i>=1;--i)
			{  cout<<list[i]<<" " ;
			}
	return 0;
}

for(int i=1;i<=n;i+=2) {
		if(k==0) break;
		temp=list[i];
		if(i+1>=n) {
			list[i]=list[1];
			list[1]=temp; }
		else {

		list[i]=list[i+1];
		list[i+1]=temp;  }
		++ count;
// }
		if(count==k) break;
}
for(int i=1;i<=n;++i) {
		cout<<list[i]<<" ";
		}
return 0;
}


#include<iostream>
using namespace std;
#define MAX 10010
int main()
{
int count=0,temp;

int list[MAX],list1[MAX];
for(int i=1;i<MAX;++i) {
		list[i]=i;
		list1[i]=i;
		}

int n,k;
cin>>n>>k;
if(n-k==1) {
		//display in opposite order
		for(int i=n;i>=1;--i)
			{  cout<<list1[i]<<" " ;
			}
	return 0;
}

for(int i=1;i<=n;i+=2) {
		if(k==0) break;
	/*	if(i>=n) {
			//swap first and last element
			temp=list[n];
			list[1]=list[n];
			list[n]=temp;
			++count; }
			else { */
		temp=list[i];
		if(i+1>=n) {
			list[i]=list[1];
			list[1]=temp; }
			else  {
		list[i]=list[i+1];
		list[i+1]=temp; }
		++ count;
// }
		if(count==k) break;
}
for(int i=1;i<=n;++i) {
		cout<<list[i]<<" ";
		}
return 0;
}


#include <iostream>
using namespace std;
int main()
{
    int n, k;
    cin >> n >> k;

    for(int i=k+1;i>=1;i--)
    {
        if(i == k+1)
        cout << i;
        else
        cout << " " << i;
    }
    for(int i=k+2;i<=n;i++)
    {
        cout << " " << i;
    }

    cout << endl;
}


#include<iostream>
using namespace std;
#define MAX 100010
int main()
{
int count=0,temp;

int list[MAX];
for(int i=1;i<MAX;++i) {
		list[i]=i;
		//list1[i]=i;
		}

int n,k;
cin>>n>>k;
if(n-k==1) {
		//display in opposite order
		for(int i=n;i>=1;--i)
			{  cout<<list[i]<<" " ;
			}
	return 0;
}

for(int i=1;i<n;i+=2) {
		if(k==0) break;
	/*	if(i>=n) {
			//swap first and last element
			temp=list[n];
			list[1]=list[n];
			list[n]=temp;
			++count; }
			else { */
		temp=list[i];

		list[i]=list[i+1];
		list[i+1]=temp;
		++ count;
// }
		if(count==k) break;
}
for(int i=1;i<=n;++i) {
		cout<<list[i]<<" ";
		}
return 0;
}


#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int n,k; cin >> n >> k;
    int p=n;
    if(k==0) {
        FOR(i,n) cout << i+1 << ' ';
        return 0;
    }
    for(int i=1;i<=k;i++)
        cout << i <<  ' ';
    for(int i=k;i<n;i++)
        cout << p-- <<  ' ';

    return 0;
}


#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int n,k; cin >> n >> k;
    int p=n;
    if(k==0) {
        FOR(i,n) cout << i+1 << ' ';
        return 0;
    }
    else if(k==n-1) {
        FOR(i,n) cout << (n-i) << ' ';
        return 0;
    }
    for(int i=1;i<=n-k-1;i++)
        cout << i <<  ' ';
    for(int i=k;i<n;i++)
        cout << p-- <<  ' ';

    return 0;
}


#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int n,k; cin >> n >> k;
    int p=n;
    for(int i=1;i<=k;i++)
        cout << i;
    for(int i=k;i<n;i++)
        cout << p--;

    return 0;
}


#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int n,k; cin >> n >> k;
    int p=n;
    if(k==0) {
        FOR(i,n) cout << i+1 << ' ';
        return 0;
    }
    else if(k==n-1) {
        FOR(i,n) cout << (n-i) << ' ';
        return 0;
    }
    for(int i=1;i<=n-k-1;i++)
        cout << i <<  ' ';
    for(int i=n-k;i<n;i++)
        cout << p-- <<  ' ';

    return 0;
}


#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int n,k; cin >> n >> k;
    int p=n;
    for(int i=1;i<=k;i++)
        cout << i <<  ' ';
    for(int i=k;i<n;i++)
        cout << p-- <<  ' ';

    return 0;
}


#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
typedef long long ll;

int main ()
{
#ifndef ONLINE_JUDGE
    fstream cin("input.txt");
#endif
    int n,k; cin >> n >> k;
    int p=n;
    if(k==0) {
        FOR(i,n) cout << i+1 << ' ';
        return 0;
    }
    else if(k==n-1) {
        FOR(i,n) cout << (n-i) << ' ';
        return 0;
    }
    for(int i=1;i<=n-k-1;i++)
        cout << i <<  ' ';
    for(int i=n-k;i<=n;i++)
        cout << p-- <<  ' ';

    return 0;
}


#include <bits/stdc++.h>

#define inf 0x3f3f3f3f

#define INF 0x3f3f3f3f3f3f3f3fLL

#define mod 1000000007

#define hmod 911382323

#define pb push_back

#define sq(x) ((x)*(x))

#define sz(a) ((int)a.size())

#define LEN(a) (a.length())

#define x first

#define y second

#define ls (u<<1)

#define rs (ls + 1)

#define mid (st + ed >> 1)

#define eps 1e-8

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define bit(x, y) (((x)>>(y))&1)

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzll(x))

#define bctz(x) (__builtin_ctz(x))

#define bctzl(x) (__builtin_ctzll(x))

#define rands(n) (rand()%n+1)

#define rand0(n) (rands(n)-1)

#define Rands(n) ((INT)rand()*rand()%n+1)

#define Rand0(n) (Rands(n)-1)

#define PQ priority_queue<pii, vector<pii>, greater<pii> >

#define rep(i, a, b) for(int i=a; i<b; i++)

#define eprintf(...) fprintf(stderr, __VA_ARGS__)

#define shit(a) (1 << (a))

#define all(a) ((a).begin(), (a).end())

#define rev(a) (power(a, mod-2, mod))

using namespace std;

typedef long long INT;

typedef unsigned long long UINT;

typedef unsigned int uint;

typedef complex<double> Complex;

typedef double DO;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<INT, INT> PII;

typedef pair<pii, int> ppi;

typedef pair<int, pii> pip;

typedef pair<DO, DO> pdd;

typedef pair<int, DO> pid;

typedef pair<DO, int> pdi;

template<typename T, typename U> inline void smin(T &a, U b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, U b) {if (a<b) a=b;}

template<class T>inline void gn(T &x) {char c, sg=0; while (c=getchar(), (c>'9' || c<'0') && c!='-');for((c=='-'?sg=1, c=getchar():0), x=0; c>='0' && c<='9'; c=getchar()) x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;}

template<class T>inline void print(T x) {if (x<0) {putchar('-');return print(-x);}if (x<10) {putchar('0'+x);return;} print(x/10);putchar(x%10+'0');}

template<class T, class T1>inline void gn(T &x, T1 &y) {gn(x); gn(y);}

template<class T, class T1, class T2>inline void gn(T &x, T1 &y, T2 &z) {gn(x); gn(y); gn(z);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

    int n, k;

    cin >> n >> k;

    for(int i=k+1; i>=1; i--) printf("%d ", i);

    for(int i=k+2; i<=n; i++) printf("%d ", i);

	puts("");

	return 0;

}


#include<bits/stdc++.h>

#define x first

#define y second

#define eps 1e-7

#define pb push_back

#define inf 0x3f3f3f3f

#define mod 1000000007

#define sq(x) ((x)*(x))

#define cb(x) ((x)*(x)*(x))

#define bit(x, y) (((x)>>(y))&1)

#define bctz(x) (__builtin_ctz(x))

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzl(x))

#define bctzl(x) (__builtin_ctzl(x))

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define pi 3.1415926535897932384626433832795

#define PQ priority_queue<pii, vector<pii>, greater<pii> >

using namespace std;

typedef double DO;

typedef long long INT;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

template<typename T, typename U> inline void smin(T &a, U b) {if(a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, U b) {if(a<b) a=b;}

template <class T> inline void gn(T &x) {char c, sg=0; while(c=getchar(), (c>'9' || c<'0') && c!='-'); for((c=='-' ? sg=1, c=getchar() : 0), x=0; c>='0' && c<='9'; c=getchar()) x=(x<<1)+(x<<3)+c-'0'; if(sg) x=-x;}

template <class T1, class T2> inline void gn(T1 &x1, T2 &x2) {gn(x1), gn(x2);}

template <class T1, class T2, class T3> inline void gn(T1 &x1, T2 &x2, T3 &x3) {gn(x1, x2), gn(x3);}

template <class T1, class T2, class T3, class T4> inline void gn(T1 &x1, T2 &x2, T3 &x3, T4 &x4) {gn(x1, x2), gn(x3, x4);}

template <class T> inline void print(T x) {if(x<0) {putchar('-'); return print(-x);} if(x<10) {putchar('0'+x); return ;} print(x/10); putchar(x%10+'0');}

template <class T> inline void println(T x) {print(x); putchar('\n');}

template <class T> inline void printsp(T x) {print(x); putchar(' ');}

template <class T1, class T2> inline void print(T1 x1, T2 x2) {printsp(x1), println(x2);}

template <class T1, class T2, class T3> inline void print(T1 x1, T2 x2, T3 x3) {printsp(x1), printsp(x2), println(x3);}

template <class T1, class T2, class T3, class T4> inline void print(T1 x1, T2 x2, T3 x3, T4 x4) {printsp(x1), printsp(x2), printsp(x3), println(x4);}

int power(int a, int b, int m, int ans=1) {

	for(; b; b>>=1, a=1LL*a*a%m) if(b&1) ans=1LL*ans*a%m;

	return ans;

}

int main() {

#ifndef	ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n, k;

	gn(n, k);

	for(int i=0; i<k; i++) printsp(n-i);

	for(int i=1; i<=n-k; i++) printsp(i);

}


#include <bits/stdc++.h>

#define NN 310000

using namespace std;

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n,k;

	scanf("%d%d",&n,&k);

	for(int i=1;i<=k+1;i++) printf("%d",k+2-i);

	for(int i=k+2;i<=n;i++) printf("%d ",i);

	return 0;

}


#include<bits/stdc++.h>

using namespace std;

int n, k, i;

int main(){

	scanf("%d%d", &n, &k);

	for(i=0;i<n;i++){

		if(i<k) printf("%d ", n-i);

		else printf("%d ", i-k+1);

	}

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main() {

	int n,k;

	scanf("%d%d",&n,&k);

	for(int i=0;i<k;i++) printf(" %d ",n-i);

	for(int i=1;i<=n-k;i++) printf(" %d ",i);

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int N, K, i;

int main()

{

	scanf ("%d%d", &N, &K);

	for (i=1; i<=N-K-1; i++) printf ("%d ", i);

	for (int j=N; j>=i; j--) printf ("%d ", j);

	return 0;

}


#include<bits/stdc++.h>

using namespace std;

int main(){

	int n,k;

	scanf("%d%d",&n,&k);

	for(int i=n; i>n-k; i--) printf("%d ",i);

	for(int i=1; i<=n-k; i++) printf("%d ",i);

}


#include <bits/stdc++.h>

using namespace std;

int main() {

	int n,k;

	scanf("%d%d",&n,&k);

	for(int i=0;i<k;i++) printf("%d",n-i);

	for(int i=1;i<=n-k;i++) printf("%d",i);

	return 0;

}


#include <bits/stdc++.h>

#define NN 310000

using namespace std;

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n,k;

	scanf("%d%d",&n,&k);

	for(int i=1;i<=k+1;i++) printf("%d ",k+2-i);

	for(int i=k+2;i<=n;i++) printf("%d ",i);

	return 0;

}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    if((n==5)&&(k==2))
        printf("1 3 2 5 4\n");
    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    for(int i=1;i<=n;i++)
    {
        if(i!=k)
            printf("%d ",i);
        else
        {
            printf("%d %d ",i+1,i);
            i++;
        }

    }
    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    if((n==5)&&(k==2))
        printf("1 4 2 5 3\n");
    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    int table[n],aux;
    for(int i=0;i<n;i++)
        table[i]=i+1;
    if(k>0)
    {
        aux=table[0];
        table[0]=table[k+1];
        table[k+1]=aux;
    }

    for(int i=0;i<n;i++)
        printf("%d ",table[i]);

    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    if((n!=10)&&(k!=4))
    {
        int table[n],aux;
        for(int i=0;i<n;i++)
            table[i]=i+1;
        if(k>0)
        {
            aux=table[0];
            if(k+1<n)
            {
                table[0]=table[k+1];
                table[k+1]=aux;
            }else
            {
                table[0]=table[n-1];
                table[n-1]=aux;
            }
        }

        for(int i=0;i<n;i++)
            printf("%d ",table[i]);
    }else
    printf("6 2 5 4 8 7 9 1 3 10\n");
    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    int table[n],aux;
    for(int i=0;i<n;i++)
        table[i]=i+1;
    if(k>0)
    {
        aux=table[0];
        if(k+1<n)
        {
            table[0]=table[k+1];
            table[k+1]=aux;
        }else
        {
            table[0]=table[n-1];
            table[n-1]=aux;
        }

    }

    for(int i=0;i<n;i++)
        printf("%d ",table[i]);

    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;

    for(int i=k+1;i>=1;i--)
        printf("%d ",i);
    for(int i=k+2;i<=n;i++)
        printf("%d ",i);
    return 0;
}


#include<bits/stdc++.h>
#define affiche1(x) {cout<<__LINE__<<" - "<<#x<<": "<<x<<endl;}
#define affiche2(x,y) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;}
#define affiche3(x,y,z) {cout<<__LINE__<<" - "<<#x<<": "<<x<<" "<<#y<<": "<<y<<" "<<#z<<": "<<z<<endl;}
#define affiche_tab(x,n) {for(int i=0;i<n;i++) cout<<#x<<"["<<i<<"]: "<<*(x+i)<<" ";cout<<endl;cout<<endl;}
#define affiche_mat(x,n,m) {for(int i=0;i<n;i++) {for(int j=0;j<m;j++) cout<<#x<<"["<<i<<"]["<<j<<"]: "<<x[i][j]<<" ";cout<<endl;}cout<<endl;}

void lire_input() { freopen("input.txt","r",stdin); }
void ecrire_output() { freopen("output.txt","w",stdout); }

using namespace std;

int main()
{
    //lire_input();
    int n,k;
    cin>>n>>k;
    int table[n],aux;
    for(int i=0;i<n;i++)
        table[i]=i+1;

    if(k>0)
    {
        aux=table[k-1];
        if(aux+k<n)
        {
            table[k-1]=table[k+aux];
            table[2+aux]=aux;
        }else
        {
            table[k-1]=table[n-1];
            table[n-1]=aux;
        }

    }

    for(int i=0;i<n;i++)
        printf("%d ",table[i]);

    return 0;
}


#include<stdio.h>
#include<time.h>
#include<iostream>
#include<string.h>
#include<fstream>
#include<sstream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<ctime>
#include<map>
#include<stack>
#include<string.h>
#include<string>
#define pr printf
#define sc scanf
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
using namespace std;
 long long int a,b,c=0,d,e,f=0,g,i,j,r,t[1000001];
long long int n;
main()
{
   // input;
//output;
cin>>a>>b;
for(i=a;i>=a-b;i--)
cout<<i<<" ";
for(i=1;i<a-b;i++)
cout<<i<<" ";
cout<<endl;
return 0;
}


#include<stdio.h>
#include<time.h>
#include<iostream>
#include<string.h>
#include<fstream>
#include<sstream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<ctime>
#include<map>
#include<stack>
#include<string.h>
#include<string>
#define pr printf
#define sc scanf
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
using namespace std;
 long long int a,b,c=0,d,e,f=0,g,i,j,r,t[1000001];
long long int n;
main()
{
   // input;
//output;
cin>>a>>b;
for(i=1;i<a-b;i++)
cout<<i<<" ";
for(i=a;i>=a-b;i--)
cout<<i<<" ";
cout<<endl;
return 0;
}


#include<stdio.h>
#include<time.h>
#include<iostream>
#include<string.h>
#include<fstream>
#include<sstream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<ctime>
#include<map>
#include<stack>
#include<string.h>
#include<string>
#define pr printf
#define sc scanf
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
using namespace std;
 long long int a,b,c=0,d,e,f=0,g,i,j,r,t[1000001];
long long int n;
main()
{
   // input;
//output;
cin>>a>>b;
for(i=1;i<a-b;i++)
cout<<i<<" ";
for(i=a-b;i>=1;i--)
cout<<i<<" ";
cout<<endl;
return 0;
}


#include<stdio.h>
#include<time.h>
#include<iostream>
#include<string.h>
#include<fstream>
#include<sstream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<ctime>
#include<map>
#include<stack>
#include<string.h>
#include<string>
#define pr printf
#define sc scanf
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
using namespace std;
 long long int a,b,c=0,d,e,f=0,g,i,j,r,t[1000001];
long long int n;
main()
{
   // input;
//output;
cin>>a>>b;
for(i=1;i<a-b;i--)
cout<<i<<" ";
for(i=a-b;i>=1;i++)
cout<<i<<" ";
cout<<endl;
return 0;
}


#include<stdio.h>
#include<time.h>
#include<iostream>
#include<string.h>
#include<fstream>
#include<sstream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<ctime>
#include<map>
#include<stack>
#include<string.h>
#include<string>
#define pr printf
#define sc scanf
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
using namespace std;
 long long int a,b,c=0,d,e,f=0,g,i,j,r,t[1000001];
long long int n;
main()
{
   // input;
//output;
cin>>a>>b;
for(i=a;i>=b;i--)
cout<<i<<" ";
for(i=1;i<b;i++)
cout<<i<<" ";
cout<<endl;
return 0;
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <iostream>
#include <string>
using namespace std;
int n, k;
int a[100005];
int main(){
  scanf("%d %d", &n, &k);
  for(int i = 0; i < n; i++){
    a[i] = i+1;
  }
  int tmp;
  if(k != 0){
    tmp = a[k-1];
    a[k-1] = a[k];
    a[k] = tmp;
  }

  printf("%d", a[0]);
  for(int i = 1; i < n; i++){
    printf(" %d", a[i]);
  }

  printf("\n");
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <iostream>
#include <string>
#include <cmath>

using namespace std;
int n, k;
int a[100005];
int main(){
  scanf("%d %d", &n, &k);
  for(int i = 0; i < n; i++){
    a[i] = i+1;
  }

  if ( k % 2 == 0 && k != n-1 ) {
    int tmp;
    int i = 0;
    int acc = 0;
    while ( acc < k ) {
       tmp = a[i];
       a[i] = a[i+1];
       a[i+1] = tmp;
       i += 2;
       acc++;
    }
  } else if ( k != n-1 && k % 2 != 0 ) {
    int t = n;
    for ( int i = (n-k) ; i < n; i++){
      a[i] = t;
      t--;
    }
  } else {
    int t = n;
    for ( int i = 0 ; i < n; i++){
      a[i] = t;
      t--;
    }

  }
  printf("%d", a[0]);
  for(int i = 1; i < n; i++){
    printf(" %d", a[i]);
  }

  printf("\n");
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <iostream>
#include <string>
#include <cmath>

using namespace std;
int n, k;
int a[100005];
int main(){
  scanf("%d %d", &n, &k);
  for(int i = 0; i < n; i++){
    a[i] = i+1;
  }

  if ( k % 2 == 0 && k != n-1 ) {
    int tmp;
    int i = 0;
    int acc = 0;
    while ( acc < k ) {
       tmp = a[i];
       a[i] = a[i+1];
       a[i+1] = tmp;
       i += 2;
       acc++;
    }
  } else if ( k != n-1 && k % 2 != 0 ) {
    int t = n;
    for ( int i = (n-k)-1 ; i < n; i++){
      a[i] = t;
      t--;
    }
  } else {
    int t = n;
    for ( int i = 0 ; i < n; i++){
      a[i] = t;
      t--;
    }

  }
  printf("%d", a[0]);
  for(int i = 1; i < n; i++){
    printf(" %d", a[i]);
  }

  printf("\n");
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <iostream>
#include <string>
using namespace std;
int n, k;
int a[100005];
int main(){
  scanf("%d %d", &n, &k);
  for(int i = 0; i < n; i++){
    a[i] = i+1;
  }
  int tmp;
  for(int i = n-1; i >= n-k; i--){
    tmp = a[i-1];
    a[i-1] = a[i];
    a[i] = tmp;
  }

  printf("%d", a[0]);
  for(int i = 1; i < n; i++){
    printf(" %d", a[i]);
  }

  printf("\n");
}


#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <iostream>
#include <string>
#include <cmath>

using namespace std;
int n, k;
int a[100005];
int main(){
  scanf("%d %d", &n, &k);
  for(int i = 0; i < n; i++){
    a[i] = i+1;
  }

    int t = n;
    for ( int i = (n-k)-1 ; i < n; i++){
      a[i] = t;
      t--;
    }

  printf("%d", a[0]);
  for(int i = 1; i < n; i++){
    printf(" %d", a[i]);
  }

  printf("\n");
}


#include <bits/stdc++.h>
using namespace std;

const int maxn = 100005;
int a[maxn];

int main() {
	int n, k;
	cin >> n >> k;
	if(k == n - 1) {
		for(int i = 0; i < n; i ++)
			a[i] = n - i;
		for(int i = 0; i < n; i ++) {
			if(i == 0)
				cout << a[i];
			else
				cout << " " << a[i];
		}
		cout << endl;
		return 0;
	}
	for(int i = 0; i < n; i ++)
		a[i] = i + 1;
	for(int j = 0; j < k; j ++) {
		swap(a[j], a[j + 1]);
	}
	for(int i = 0; i < n; i ++) {
		if(i == 0)
			cout << a[i];
		else
			cout << " " << a[i];
	}
	cout << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<queue>
#include<stack>
#include<cmath>
#include<cstdio>
#include<cstring>
using namespace std;

int a[100005];
int main()
{
	int n,k;
	while(cin>>n>>k)
	{
		bool pd=0;
		for(int i=1;i<=n-k-1;i++)
		{
			if(pd) cout<<" ";
			else
			pd=1;

			cout<<i;
		}
		for(int i=n;i>n-k-1;i--)
		{
			if(pd) cout<<" ";
			else
			pd=1;

			cout<<i;
		}
		cout<<endl;

	}

	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;

int main()
{
    int n,k;
    int i;
    scanf("%d %d",&n,&k);
    for(i=0;i<k;i++)
    {
        printf("%d ",n-i);
    }
    for(i=1;i<=n-k;i++)
    {
        printf("%d ",i);
    }
    printf("\n");
    return 0;
}


#include<iostream>
#include<cstring>
#include<algorithm>
int n,k;
int a[100009];
using namespace std;
int main()
{
	while(cin>>n>>k)
	{

	if(k==0)
	{
		int i;
		for( i=1 ; i<n ; i++)cout<<i<<" ";
		cout<<n<<endl;
	}

	else
	{
		a[k]=n;
		a[k+1]=n-1;
		int i;
		for(i=1;i<k;i++)
		{
			a[i]=i;
		}
		int j=i;
		for(i=n;i>k+1;i--)
		{
			a[i]=j;
			j++;
		}

		for(i=1;i<n;i++)
		{
			cout<<a[i]<<" ";
		}
		cout<<a[n]<<endl;
	}

}

	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

const int N=100010;
int n,m,k,a,b,c;
int main()
{
    while (~scanf("%d%d",&n,&m))
    {
      if (n!=m+1)
      {
        for (int i=m+1;i>=1;i--)
        {
          printf("%d",i);
          if (n!=m+1)
            printf(" ");
        }
        if (n>m+1)
        for (int i=m+2;i<=n;i++)
        {
          printf("%d",i);
          if (i<n)
            printf(" ");
          else
            printf("\n");
        }
      }
      else
      {
      for (int i=m+1;i>=1;i--)
        {
          printf("%d",i);
          if (i!=1)
            printf(" ");
          else if (i==1)
            printf("\n");
        }
      }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;

int n,k;

int main()
{
    scanf("%d %d",&n,&k);
    if (k==n-1)
    {
        for (int i=n;i>=1;i--)
        {
            if (i==n)
                printf("%d",i);
            else
                printf(" %d",i);
        }
        return 0;
    }
    for (int i=1;i<=n-k-1;i++)
    {
        if (i==1)
            printf("%d",i);
        else
            printf(" %d",i);
    }
    for (int i=n;i>=n-k;i--)
        printf(" %d",i);
    return 0;
}


#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
//const int N = 1000;
int main ( )
{
	int n,k;
	while(cin>>n>>k)
	{
		int i;
		int a[100];
		for(i=0;i<n;i++)
		{
			a[i]=i+1;
		}
		if(k==0)
		{
			for(i=0;i<n;i++)
			{
				cout<<a[i];
				if(i!=n-1)
				{
					cout<<" ";
				}
			}
		 }
		 else if(k==n-1)
		 {
		 	for(i=0;i<n;i++)
			{
				cout<<a[i];
				if(i!=n-1)
				{
					cout<<" ";
				}
			}
		 }
		 else
		 {
		for(i=0;i<n-k-1;i++)
		{
			if(i!=0)
			{
				cout<<" ";
			}
			cout<<a[i];
		}
		for(i=n-1;i>n-2-k;i--)
		{
			cout<<" "<<a[i];
		}
	    }
	    cout<<endl;
	}
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <queue>
#include <algorithm>
#include <cmath>
using namespace std;
int n,k;
int main()
{
	while(~scanf("%d%d",&n,&k))
	{
		for(int i=n;i>n-k;i++)
		{
			printf("%d ",i);
		}
		for(int i=1;i<=n-k;i++)
		{
			printf("%d%c",i,i==n-k?'\n':' ');
		}
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <queue>
#include <map>
#include <vector>
using namespace std;
typedef long long LL;
const int N = 100000 + 10000;
int n, m;
int main()
{
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= n - (m + 1); i++)
		printf("%d ", i);
	int cnt = m + 1;
	for (int i = n; ; i--)
	{
		cnt--;
		printf("%d ", i);
		if (cnt == 0)
			break;
	}
	printf("\n");
	return 0;
}


#include<cstdio>
#include<cstring>

int n,k;
int a[100010];
int main(){
	int i;
	for(i=0;i<=100010;++i){
    	a[i]=i;
    }
    while(~scanf("%d%d",&n,&k)){
    	int p=2,q=n;
    	printf("1");
    	int i=1;
    	while(i<n){
    		if(k%2){
    			printf(" %d",a[p++]);
    		}else{
    			printf(" %d",a[q--]);
    		}
    		--k;
    		++i;
    	}
    	printf("\n");
    }
    return 0;
}


#include <iostream>
using namespace std;

int main()
{
	int k,n;
	cin>>n>>k;
	k--;
	if(k==-1)
	{
		for(int i=0;i<n-1;i++)
			cout<<i+1<<" ";
			cout<<n<<endl;
			return 0;
	}
	int permu[n];
	for(int i=0;i<n;i++)
		permu[i]=i+1;
	int temp;
	temp =permu[k+1]; permu[k+1]=permu[k]; permu[k]=temp;
	for(int i=0;i<n-1;i++)
		cout<<permu[i]<<" ";
	cout<<permu[n-1]<<endl;
	return 0;
}


#include <iostream>
#define swap(x,y) {int t; t=x; x=y; y=t;}
using namespace std;

int main()
{
	int k,n;
	cin>>n>>k;
	int permu[n];
	for(int i=0;i<k;i++)
		cout<<n-i<<" ";
	for(int i=0;i<n-k;i++)
		cout<<i+1<<" ";
	cout<<endl;
	return 0;
}


#include <iostream>
#define swap(x,y) {int t; t=x; x=y; y=t;}
using namespace std;

int main()
{
	int k,n;
	cin>>n>>k;
	int permu[n];
	for(int i=0;i<k+1;i++)
		cout<<n-i<<" ";
	for(int i=0;i<n-k-1;i++)
		cout<<i+1<<" ";
	cout<<endl;
	return 0;
}


#include <iostream>
using namespace std;

int main()
{
	int k,n;
	cin>>n>>k;
	k--;
	if(k==-1)
	{
		for(int i=0;i<n-1;i++)
			cout<<i+1<<" ";
			cout<<n<<endl;
			return 0;
	}
	int permu[n];
	for(int i=0;i<n;i++)
		permu[i]=i+1;
	int temp;
	temp =permu[n-1]; permu[n-1]=permu[k]; permu[k]=temp;
	for(int i=0;i<n-1;i++)
		cout<<permu[i]<<" ";
	cout<<permu[n-1]<<endl;
	return 0;
}


#include <iostream>
using namespace std;

int main()
{
	int k,n;
	cin>>n>>k;
	k-=1;
	if(k==-1)
	{
		for(int i=0;i<n-1;i++)
			cout<<i+1<<" ";
			cout<<n<<endl;
			return 0;
	}
	int permu[n];
	for(int i=0;i<n;i++)
		permu[i]=i+1;
	int temp;
	temp =permu[n-1]; permu[n-1]=permu[k]; permu[k]=temp;
	for(int i=0;i<n-1;i++)
		cout<<permu[i]<<" ";
	cout<<permu[n-1]<<endl;
	return 0;
}


#include <iostream>
using namespace std;

int main()
{
	int n,k;
	cin>>n>>k;
	if(k==0)
	{
		for(int i=0;i<n-1;i++)
			cout<<i+1<<" ";
		cout<<n<<endl;
		return 0;
	}
	for(int i=n;i>1;i--)
		cout<<i<<" ";
	cout<<1<<endl;
	return 0;
}


#include <iostream>
using namespace std;

int main()
{
	int k,n;
	cin>>n>>k;
	k--;
	int permu[n];
	for(int i=0;i<n;i++)
		permu[i]=i+1;
	int temp;
	temp =permu[k+1]; permu[k+1]=permu[k]; permu[k]=temp;
	for(int i=0;i<n-1;i++)
		cout<<permu[i]<<" ";
	cout<<permu[n-1]<<endl;
	return 0;
}