/*
URL_HERE
*/
/*

*/
#ifdef _WIN32
#pragma warning(disable:4996)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <math.h>
#include <limits.h>
#include <queue>
#include <iostream>
using namespace std;

FILE* _fin = stdin;
FILE* _fout = stdout;
#define PI 3.141592653589793238462643383279502884197169399375105820974
#define ten5p1 100001
#define ten6p1 1000001
#define ten8p1 100000001
#define ten9p1 1000000001
#define uint unsigned int
#define ll long long
#define ull unsigned long long
#define rep(var,n) for(int var=0;var<n;++var)
#define repi(n) rep(i,n)
#define repj(n) rep(j,n)
#define repi1(n) for(int i=1;i<n;++i)
#define repj1(n) for(int j=1;j<n;++j)
int _min(int a, int b) { return a <= b ? a : b; }
ll _min(ll a, ll b) { return a <= b ? a : b; }
int _max(int a, int b) { return a >= b ? a : b; }
ll _max(ll a, ll b) { return a >= b ? a : b; }
void zero(int* data, int n) { memset(data, 0, sizeof(int) * n); }
void zero(ll* data, int n) { memset(data, 0, sizeof(ll) * n); }
void zero(unsigned long long* data, int n) { memset(data, 0, sizeof(unsigned long long) * n); }
void zero(char* data, int n) { memset(data, 0, sizeof(char) * n); }
char readc() { char var; fscanf(_fin, "%c", &var); return var; }
int readi() { int var; fscanf(_fin, "%d", &var); return var; }
double readlf() { double var; fscanf(_fin, "%lf", &var); return var; }
ll readll() { ll var; fscanf(_fin, "%lld", &var); return var; }
void repread(int* data, int n) { repi(n) data[i] = readi(); }
void repread(ll* data, int n) { repi(n) data[i] = readll(); }
int reads(char* str, int maxsize)
{
	for (;;) { if (fgets(str, maxsize, _fin) == NULL) break; if (str[0] != '\n' && str[0] != '\r') break; }
	int slen = strlen(str); if (slen == 0) return 0;
	if (str[slen - 1] == '\n' || str[slen - 1] == '\r') str[--slen] = 0;
	return slen;
}

#define writec(var) fprintf(_fout,"%c",var)
#define writecsp(var) fprintf(_fout,"%c ",var)
#define writecln(var) fprintf(_fout,"%c\n",var)
#define writei(var) fprintf(_fout,"%d",var)
#define writeisp(var) fprintf(_fout,"%d ",var)
#define writellsp(var) fprintf(_fout,"%lld ",var)
#define writeiln(var) fprintf(_fout,"%d\n",var)
#define writellln(var) fprintf(_fout,"%lld\n",var)
#define writeulln(var) fprintf(_fout,"%llu\n",var)
#define writefln(var) fprintf(_fout,"%f\n",var)
#define writes(str) fprintf(_fout,"%s",str)
#define writesp() fprintf(_fout," ")
#define writeln() fprintf(_fout,"\n")
#define RUN_LOCAL(testfilename) {_fin = fopen(testfilename, "r"); if(_fin==NULL) _fin=stdin;}
#define swap(type,a, b) {type t=a;a=b;b=t;}
#define sort(data,n) std::sort(data,data+n)
//#define mod(a,b) b==0 ? 0 : a==0 ? 0 :(a>0 ? a%b : b + a % b) //what the hell is this...
ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); }
ll lcm(ll a, ll b) { ll g = gcd(a, b); return (a / g) * b; }
void reverse(char* data, int n) { int k = n >> 1; repi(k) { char tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } }
void reverse(int* data, int n) { int k = n >> 1; repi(k) { int tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } }
void reverse(ll* data, int n) { int k = n >> 1; repi(k) { ll tmp = data[i]; data[i] = data[n - i - 1]; data[n - i - 1] = tmp; } }

#define _Vec(type, name) \
struct name { type* data; int size; int n; };\
void init(name* t, int size) { t->data = (type*)malloc(sizeof(type) * size); t->size = size; t->n = 0; }\
void resize(name* t) { int ns = t->size * 1.2f; t->data = (type*)realloc(t->data, sizeof(type) * ns); t->size = ns; }\
void add(name* t, type val) { if (t->n >= t->size) resize(t); int k = t->n; t->data[k] = val; t->n = k + 1; }\
void free(name* t) { free(t->data);}
_Vec(int, Veci)
_Vec(long long, Vecll)
_Vec(char*, Vecs)

#define _ispal(type, name) int name(type* a, type* b, int n){repi(n){if (a[i] != b[n - i - 1]){return 0;}}return 1;}
_ispal(int, ispali)
_ispal(char, ispalc)

#define _Pair(type, name) struct name{type x, y;}; \
int cmp_##name(const void* _a, const void* _b)\
{\
	name* a = (name*)_a;name* b = (name*)_b;\
	if (a->x < b->x) return -1;\
	else\
	{\
		if (a->x == b->x)\
		{\
			if (a->y == b->y) return 0;\
			if (a->y < b->y) return -1;\
			else return 1;\
		}\
		else\
		{\
			return 1;\
		}\
	}\
}\
void sort_##name(name* d, int n){qsort(d, n, sizeof(name), cmp_##name);}
	_Pair(int, Pairi)
	_Pair(double,Pairlf)

	int cmp_Str(const void* _a, const void* _b) { char* a = *((char**)_a); char* b = *((char**)_b); return strcmp(a, b); }
void sort_Str(char** str, int n) { qsort(str, n, sizeof(char*), cmp_Str); }

ll expmod(ll x, ll n, ll m) {
	ll ans = 1;
	for (; n;) {
		if (n & 1) ans = (ans * x) % m;
		x = (x * x) % m;
		n >>= 1;
	}
	return ans;
}

ll combmod(ll n, ll k, ll m) {
	ll ret = 1;
	ll div = 1;
	for (ll i = 0; i < k; ++i) {
		ret = (ret * (n - i) % m) % m;
		div = (div * (i + 1)) % m;
	}
	div = expmod(div, m - 2, m) % m;
	return (ret * div) % m;
}

int next_perm(int* data, int n)
{
	//find first i,i+1 where d[i]<d[i+1]
	int rootidx = -1;
	for (int i = n - 2; i >= 0; --i)
	{
		if (data[i] < data[i + 1])
		{
			rootidx = i;
			break;
		}
	}

	if (rootidx == -1) return 0;

	int ceilingidx = rootidx + 1;
	//find smallest d[x] after d[rooti] where d[x]>d[rooti]
	for (int i = rootidx + 2; i < n; ++i)
	{
		if (data[i] > data[rootidx] && data[i] < data[ceilingidx])
		{
			ceilingidx = i;
		}
	}

	swap(int, data[rootidx], data[ceilingidx]);
	sort(&data[rootidx + 1], n - rootidx - 1);
	return 1;
}
int count_digits(ll a)
{
	int k = 0;
	for (;;)
	{
		if (a == 0)break;
		k++;
		a /= 10;
	}
	return k;
}

/*
use only when val EXISTS in data
*/
int bs_exists(int* data, int n, int val)
{
	int left = 0;
	int right = n - 1;
	for (; left < right;)
	{
		int mid = (left + right + 1) >> 1;
		if (data[mid] <= val) left = mid;
		else right = mid - 1;
	}
	return right;
}

ll simple_factorial(int x)
{
	ll f = 1.0;
	repi(x)
	{
		f *= (i + 1);
	}
	return f;
}

unsigned long long djb2(char* data, int n)
{
	unsigned long long h = 5381;
	for (int i = 0; i < n; ++i) h = (h << 5) + h + data[i];
	return h;
}

struct Hashcount
{
	int* count;
	unsigned long long* keys;
	int size_bits;
};
void init(Hashcount* h, int size_bits)
{
	h->size_bits = size_bits;
	int size = 1 << h->size_bits;
	h->count = (int*)malloc(sizeof(int) * size);
	zero(h->count, size);
	h->keys = (unsigned long long*)malloc(sizeof(unsigned long long) * size);
	zero(h->keys, size);
}

int set(Hashcount* h, unsigned long long key)
{
	//knuth's golden ratio multiplicative hashing for 64-bit keys
	int index = (key * 2654435761) >> (64 - h->size_bits);
	int size = 1 << h->size_bits;
	for (int i = 0; i < size; i++)
	{
		if (h->keys[index] == key) //if key exists, overwrite data
		{
			h->count[index]++;
			return index;
		}

		if (h->keys[index] == 0) //empty spot
		{
			h->count[index] = 1;
			h->keys[index] = key;
			return index;
		}

		index++;
		index &= size - 1;
	}

	return -1;//return invalid index if data was not placed. this could be used as an indicator to resize.
}

int get(Hashcount* h, unsigned long long key)
{
	int index = (key * 2654435761) >> (64 - h->size_bits);
	int size = 1 << h->size_bits;
	for (int i = 0; i < size; i++)
	{
		if (h->keys[index] == key)//found original key
		{
			return h->count[index];
		}

		if (h->keys[index] == 0) return 0;//if you see a zero,key was never there

		index++;
		index &= size - 1;
	}
	return 0;
}
//not sure if this works
int sub(Hashcount* h, unsigned long long key)
{
	int index = (key * 2654435761) >> (64 - h->size_bits);
	int size = 1 << h->size_bits;
	for (int i = 0; i < size; i++)
	{
		if (h->keys[index] == key)//found original key
		{
			--h->count[index];
			if (h->count[index] < 0) h->count[index] = 0;
			return h->count[index];
		}

		if (h->keys[index] == 0) return 0;//if you see a zero,key was never there

		index++;
		index &= size - 1;
	}
	return 0;
}

const ll MOD  = 1e9 + 7;
/*
//proper binary search???
//tested on 1 problem it works!!!!!!!
int left = 0;
int right = n-1;
for (;;)
{
	if (left >= right)break;
	int mid = (left + right) >> 1;
	if (x <= a[mid]) right = mid;
	else left = mid+1;
}

printf("%d %d\n",right, a[right]);
*/

//------------------------------------------

//------------
int d(int* a, int offset, int n)
{
	if (n <= 1) return -1;
	if (a[offset] == n)
	{
		return d(a,1, n - 1);
	}
	else if(a[n-1] == n)
	{
		return d(a,0, n - 1);
	}

	repi(n) if (a[i+offset] == n) return i+offset;
}
int main()
{

	RUN_LOCAL("input.txt");
	int t = readi();
	rep(_t, t)
	{
		int n = readi();
		static int a[1000];
		repread(a, n);
		int x = d(a,0, n);
		if (x == -1) printf("NO\n");
		else printf("YES\n%d %d %d\n", x, x + 1, x + 2);
	}
	return 0;
}
/*
1
4
4 1 3 2
*/


#include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include<stdio.h>
using std::vector;
using std::pair;
using std::cin;
using std::cout;
using std::endl;
using std::make_pair;
using std::string;
int n;
long long  x,a,b,c;

std::vector<long int> v;
std::vector<long int> v_aux;

std::vector<std::vector<std::vector<long long>>> v3;

//491225827
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    cin>>n;
    for (int j = 0; j < n; ++j) {
        cin >> x;
        int t = 0;
        v_aux.resize(x+1);
        int left = 0;
        int right = x-1;

        for (long long i = 0;  i < x; ++i) {//} = std::max(k + 1, x/d))
            cin >> t;
            v.push_back(t);
            v_aux[t] = i;
        }
        bool solved = false;
        for (int i = x; i > 0; --i) {
            if (v_aux[i] == left) {
                left++;
                continue;
            }
            if (v_aux[i] == right) {
                right--;
                continue;
            }
            cout << "YES" << endl;
            cout << v_aux[i] << " " << v_aux[i] + 1 << " " << v_aux[i] + 2;
            cout << endl;
            solved = true;
            break;
        }

        if (!solved) {
            cout << "NO";
            cout << endl;
        }

        v.clear();
    }
    return 0;
}


#include <iostream>
using namespace std;
int main() {
  int n;
  int a[1000];
  cin >> n;
  for(int i=0; i<n; ++i)
  {
    int k;
    cin >> k;
    for(int j = 0; j<k; ++j)
    {
      cin >> a[j];
    }

    bool go = true;
    int ii, jj, kk;

    int t = 0;
    while(t<k-2 && a[t]>a[t+1])
      ++t;
    if(t>=k-2)
    {
      cout << "NO" << endl;
      continue;
    }
    ii = t;
    while(t<k-1 && a[t]<a[t+1])
      ++t;
    if(t>=k-1)
    {
      cout << "NO" << endl;
      continue;
    }
    jj = t;
    kk = t+1;

      cout << "YES" << endl;
      cout << ii+1 << " " << jj+1 << " " << kk+1 << endl;
  }
}


#include <iostream>
using namespace std;
int main() {
  int n;
  int a[1000];
  cin >> n;
  for(int i=0; i<n; ++i)
  {
    int k;
    cin >> k;
    for(int j = 0; j<k; ++j)
    {
      cin >> a[j];
    }

    bool go = true;
    int ii, jj, kk;
    for(ii=0; (ii<k) && go; ++ii)
    {
      int pi = a[ii];
      for(jj=ii+1; (jj<k) && go; ++jj)
      {
        int pj = a[jj];
        for(kk= jj+1; (kk<k) && go; ++kk)
        {
          int pk = a[kk];
          if( (pi<pj)&&(pj>pk) )
          {
            go = false;
          }
        }
      }
    }
    if(go)
    {
      cout << "NO" << endl;
    }
    else
    {
      cout << "YES" << endl;
      cout << ii << " " << jj << " " << kk << endl;
    }
  }
}


#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>
#include <utility>
#include <set>
#define  pb push_back;
#define  ll long long
#define F first
#define S second
#define  mp make_pair
using namespace std;

typedef vector <int> vi;

int main(){
	ll T;
	cin >> T;
	while (T--)
	{
		int a[1006];
		int n;
		cin >> n;
		bool cond = false;
		int index;
		for (int i = 0; i < n; i++) cin >> a[i];
		for (int i = 1; i < n - 1; i++){
			if (a[i] > a[i - 1] && a[i] > a[i + 1])
			{
				cond = true;
				index = i + 1;
				break;
			}
		}
		if (cond)
		{
			cout << "YES" << endl;
			cout << index - 1 << "  " << index << "  " << index + 1 << endl;
		}
		else cout << "NO" << endl;
	}
}


using namespace std;
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <bitset>
#include <iterator>
#include <set>
#include <unordered_set>
#include <string>
#include <functional>
#include <limits.h>
//#include <bits/stdc++.h>
//#include <list>
#include <stack>
#include <stdio.h>
typedef signed long long ll; //watch out ll= int*int will not become ll, rather (ll)ini*int casting will work
#include <queue>
#include <math.h>
#include <deque>
#define ffor(i,n) for(int i = 0;i < (n); ++i)
#define all(v) v.begin(),v.end()
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vpii vector<pii>
//typedef long float lf;
#include <cmath>
#include <iomanip>
#include <numeric>
#include <stdio.h>
const long double PI = 3.141592653589793238L;
/*struct CustomCompare
{
	bool operator()(pii& p1, pii& p2)
	{
		if (p1.second - p1.first == p2.second - p2.first)
			return p1.first > p2.first;

		return p1.second - p1.first < p2.second - p2.first;
	}
};*/
int tt, n, k, inp, a, b, x,m;
void pv(vector<int> a) {
	for (auto i : a)
		cout << i<< ' ';
	cout << '\n';
}
void pp (vector<pair<int, int>> a) {
	for (auto i : a)
		cout << i.first << ' ' << i.second<<'\n';
}
void copy(vector<long long>& a, vector<long long>& b) {
	b[0] = a[0];
	for (unsigned i = 1; i < a.size(); i++) {
		b[i] = b[i - 1] + a[i];
	}

}
int solve(int n) {
	int upto = sqrt(n) + 1;
	int lcm = n - 1;
	for (int k = 2; k < upto; k++) {
		if (n % k == 0) {
			return n / k;
			lcm = n * (k - 1) / k;
			break;
		}

	}
	return 1;

}

long long odds(int start, int end, vector<long long>& pref, vector<long long> &a) {
	//cout << "START AND END" << start<<' '<< end <<'\n';
	return (long long)pref[end] - (long long)pref[start] + (long long)a[start];
}

int find(vector<int>& a, int start, int end, int value) {
	for (; start < end; start++)
		if (a[start] == value)
			return start;
	return start;
}

int main() {
	//vector<int> x = { 2,1,0 };
	int t;
	cin >> t;
	for (int tt = 0; tt < t; tt++) {
		cin >> n;
		vector<int> a(n), pref(n), suff(n);
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		pref[0] = a[0]; suff[n - 1] = a[n - 1];
		for (int i = 1; i < n; i++)
			pref[i] = min(pref[i - 1], a[i]);
		for (int i = n-2; i >=0; i--)
			suff[i] = min(suff[i + 1], a[i]);
		int cur = 0;
		for (; cur < n; cur++) {
			if (a[cur] > pref[cur] && a[cur] > suff[cur])break;
		}
		if (cur == n)
			cout << "NO \n";
		else
			cout << "YES \n" << find(a, 0,cur,pref[cur]) << ' '<< cur << ' '<<find(a,cur,n,suff[cur])<<endl;

	}
}


using namespace std;
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <bitset>
#include <iterator>
#include <set>
#include <unordered_set>
#include <string>
#include <functional>
#include <limits.h>
//#include <bits/stdc++.h>
//#include <list>
#include <stack>
#include <stdio.h>
typedef signed long long ll; //watch out ll= int*int will not become ll, rather (ll)ini*int casting will work
#include <queue>
#include <math.h>
#include <deque>
#define ffor(i,n) for(int i = 0;i < (n); ++i)
#define all(v) v.begin(),v.end()
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vpii vector<pii>
//typedef long float lf;
#include <cmath>
#include <iomanip>
#include <numeric>
#include <stdio.h>
const long double PI = 3.141592653589793238L;
/*struct CustomCompare
{
	bool operator()(pii& p1, pii& p2)
	{
		if (p1.second - p1.first == p2.second - p2.first)
			return p1.first > p2.first;

		return p1.second - p1.first < p2.second - p2.first;
	}
};*/
int tt, n, k, inp, a, b, x,m;
void pv(vector<int> a) {
	for (auto i : a)
		cout << i<< ' ';
	cout << '\n';
}
void pp (vector<pair<int, int>> a) {
	for (auto i : a)
		cout << i.first << ' ' << i.second<<'\n';
}
void copy(vector<long long>& a, vector<long long>& b) {
	b[0] = a[0];
	for (unsigned i = 1; i < a.size(); i++) {
		b[i] = b[i - 1] + a[i];
	}

}
int solve(int n) {
	int upto = sqrt(n) + 1;
	int lcm = n - 1;
	for (int k = 2; k < upto; k++) {
		if (n % k == 0) {
			return n / k;
			lcm = n * (k - 1) / k;
			break;
		}

	}
	return 1;

}

long long odds(int start, int end, vector<long long>& pref, vector<long long> &a) {
	//cout << "START AND END" << start<<' '<< end <<'\n';
	return (long long)pref[end] - (long long)pref[start] + (long long)a[start];
}

int find(vector<int>& a, int start, int end, int value) {
	for (; start < end; start++)
		if (a[start] == value)
			return start;
	return start;
}

int main() {
	//vector<int> x = { 2,1,0 };
	int t;
	cin >> t;
	for (int tt = 0; tt < t; tt++) {
		cin >> n;
		vector<int> a(n), pref(n), suff(n);
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		pref[0] = a[0]; suff[n - 1] = a[n - 1];
		for (int i = 1; i < n; i++)
			pref[i] = min(pref[i - 1], a[i]);
		for (int i = n-2; i >=0; i--)
			suff[i] = min(suff[i + 1], a[i]);
		int cur = 0;
		for (; cur < n; cur++) {
			if (a[cur] > pref[cur] && a[cur] > suff[cur])break;
		}
		if (cur == n)
			cout << "NO \n";
		else
			cout << "YES \n" << find(a, 0,cur,pref[cur]) << ' '<< find(a,cur,n,suff[cur]) << ' ' << cur<<endl;

	}
}


using namespace std;
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <bitset>
#include <iterator>
#include <set>
#include <unordered_set>
#include <string>
#include <functional>
#include <limits.h>
//#include <bits/stdc++.h>
//#include <list>
#include <stack>
#include <stdio.h>
typedef signed long long ll; //watch out ll= int*int will not become ll, rather (ll)ini*int casting will work
#include <queue>
#include <math.h>
#include <deque>
#define ffor(i,n) for(int i = 0;i < (n); ++i)
#define all(v) v.begin(),v.end()
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vpii vector<pii>
//typedef long float lf;
#include <cmath>
#include <iomanip>
#include <numeric>
#include <stdio.h>
const long double PI = 3.141592653589793238L;
/*struct CustomCompare
{
	bool operator()(pii& p1, pii& p2)
	{
		if (p1.second - p1.first == p2.second - p2.first)
			return p1.first > p2.first;

		return p1.second - p1.first < p2.second - p2.first;
	}
};*/
int tt, n, k, inp, a, b, x,m;
void pv(vector<int> a) {
	for (auto i : a)
		cout << i<< ' ';
	cout << '\n';
}
void pp (vector<pair<int, int>> a) {
	for (auto i : a)
		cout << i.first << ' ' << i.second<<'\n';
}
void copy(vector<long long>& a, vector<long long>& b) {
	b[0] = a[0];
	for (unsigned i = 1; i < a.size(); i++) {
		b[i] = b[i - 1] + a[i];
	}

}
int solve(int n) {
	int upto = sqrt(n) + 1;
	int lcm = n - 1;
	for (int k = 2; k < upto; k++) {
		if (n % k == 0) {
			return n / k;
			lcm = n * (k - 1) / k;
			break;
		}

	}
	return 1;

}

long long odds(int start, int end, vector<long long>& pref, vector<long long> &a) {
	//cout << "START AND END" << start<<' '<< end <<'\n';
	return (long long)pref[end] - (long long)pref[start] + (long long)a[start];
}

int find(vector<int>& a, int start, int end, int value) {
	for (; start < end; start++)
		if (a[start] == value)
			return start;
		return start;

}

int main() {
	//vector<int> x = { 2,1,0 };
	int t;
	cin >> t;
	for (int tt = 0; tt < t; tt++) {
		cin >> n;
		vector<int> a(n), pref(n), suff(n);
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		pref[0] = a[0]; suff[n - 1] = a[n - 1];
		for (int i = 1; i < n; i++)
			pref[i] = min(pref[i - 1], a[i]);
		for (int i = n-2; i >=0; i--)
			suff[i] = min(suff[i + 1], a[i]);
		int cur = 0;
		for (; cur < n; cur++) {
			if (a[cur] > pref[cur] && a[cur] > suff[cur])break;
		}
		if (cur == n)
			cout << "NO \n";
		else
			cout << "YES \n" << find(a, 0,cur,pref[cur])+1 << ' '<< cur+1<<' '<< find(a,cur,n,suff[cur])+1 << ' ' << endl;

	}
}


#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <queue>
#include <string>

using namespace std;

typedef long long ll;

int main() {
	int T;
	cin >> T;

	for (int t = 0; t < T; t++) {
		int n;
		cin >> n;
		vector<int> perm(n);
		for (int i = 0; i < n; i++) cin >> perm[i];

		int pi = -1, pj = -1, pk = -1;
		for (int i = 1; i < n; i++) {
			if (perm[i] > perm[i - 1]) {
				pi = i - 1;
				pj = i;
			} else if (perm[i] < perm[i - 1] && pi != -1) {
				pk = i;
				break;
			}
		}

		if (pi != -1 && pk != -1) cout << "YES" << endl << (pi + 1) << " " << (pj + 1) << " " << (pk + 1) << endl;
		else cout << "NO" << endl;
	}

	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
	int t; cin >> t;
	while (t--) {
		int n; cin >> n; int p[3001], i = 0, j = 0, k = 0,r=0,q=0; for (int i = 0; i < n; i++) { cin >> p[i]; }
		for (int i = 1; i < n-1; i++) {
			q = i;
			for(j=i-1;j>=0;j--){
				if (p[j] < p[i]) {
					for (k = i + 1; k <n; k++) {
						if (p[i] > p[k]) {
							cout << "YES" << endl;
							cout << j+1 << " " << i+1 << " " << k+1 << endl ;
							r = 1;
							break;
						}
					}
			}
				if (r == 1) { break; }
			}
			if (r == 1) { break; }
		}
		if (q == (n - 2) && r == 0) { cout << "NO" << endl; }
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
	int t; cin >> t;
	while (t--) {
		long long n; cin >> n; long long p[1001], i = 0, j = 0, k = 0,r=0,q=0; for (int i = 0; i < n; i++) { cin >> p[i]; }
		for (int i = 1; i < n - 1; i++) {
			q = i;
			if (p[i] > p[i - 1]) {
				for (int j = i + 1; j < n; j++) {
					if (p[i] > p[j]) { cout << "YES" << endl; cout << i << " " << i + 1 << " " << j+1<< endl; r = 1; break; }
				}
				if (r == 1) { break; }
			}
		}
		if (r == 0 && q==(n-2)) { cout << "NO" << endl; }
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
	int t; cin >> t;
	while (t--) {
		long long n; cin >> n; long long p[1001], i = 0, j = 0, k = 0,r=0,q=0; for (int i = 0; i < n; i++) { cin >> p[i]; }
		for (int i = 1; i < n-1; i++) {
			q = i;
			for(j=i-1;j>=0;j--){
				if (p[j] < p[i]) {
					for (k = i + 1; k <n; k++) {
						if (p[i] > p[k]) {
							cout << "YES" << endl;
							cout << j+1 << " " << i+1 << " " << k+1 << endl ;
							r = 1;
							break;
						}
					}
			}
				if (r == 1) { break; }
			}
			if (r == 1) { break; }
		}
		if (q == (n - 2) && r == 0) { cout << "NO" << endl; }
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main() {
	int t; cin >> t;
	while (t--) {
		long long n; cin >> n; long long p[1001], i = 0, j = 0, k = 0,r=0,q=0; for (int i = 0; i < n; i++) { cin >> p[i]; }
		for (int i = 1; i < n - 1; i++) {
			if (p[i - 1]<p[i] && p[i]>p[i + 1]) {
				cout << "YES" << endl;
				cout << i << " " << i+1 << " " << i + 2 << endl;
				r = 1;
				break;
			}
		}
		if (r == 0) { cout << "NO" << endl; }
	}
	return 0;
}


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

int main(){
	int t;
	cin >> t;
	while(t--){
		vector<int> v;
		int n;cin >> n;
		int tmp;
		for (int i=0;i<n; i++) {
			cin >> tmp;
			v.push_back(tmp);
		}
		int l=0,r=n-1,max=n;
		while (l<r && (v[l]==max || v[r]==max)){
			v[l]==max? l++:r--;max--;}
		if (l==r) cout<<"no\n";
		else for(int s=l;s<=r;s++) if(v[s]==max)
			cout<<"yes\n"<<s<<" "<<s+1<<" "<<s+2<<endl;
	}
}


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

int main(){
	int t;
	cin >> t;
	while(t--){
		vector<int> v;
		int n;cin >> n;
		int tmp;
		for (int i=0;i<n; i++) {
			cin >> tmp;
			v.push_back(tmp);
		}
		bool flag=false;
		tmp=n;
		for (int i=0;i<n;i++)
			if (v[i]==tmp){
				tmp--;continue;
			}
			else for (int j=i+1;j<n;j++)
				if (v[i]<v[j])
				for(int k=j+1;k<n;k++){
					if (v[k]<v[j]) {
						cout<<"yes\n"<<i+1<<" "<<j+1<<" "<<k+1<<endl;
						i=n;j=n;k=n;
						flag=true;
					}
				}
					if (flag) continue;
					else cout<<"no\n";
	}
}


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

int main(){
	int t;
	cin >> t;
	while(t--){
		vector<int> v;
		int n;cin >> n;
		int tmp;
		for (int i=0;i<n; i++) {
			cin >> tmp;
			v.push_back(tmp);
		}
		bool flag=false;
		for (int i=0;i<n;i++)
			for (int j=i;j<n;j++)
				if (v[i]<v[j])
				for(int k=j+1;k<n;k++){
					if (v[i]<v[j] && v[k]<v[j]) {
						cout<<"yes\n"<<i+1<<" "<<j+1<<" "<<k+1<<endl;
						i=n;j=n;k=n;
						flag=true;
					}
				}
					if (flag) continue;
					else cout<<"no\n";
	}
}


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

int main(){
	int t;
	cin >> t;
	while(t--){
		vector<int> v;
		int n;cin >> n;
		int tmp;
		for (int i=0;i<n; i++) {
			cin >> tmp;
			v.push_back(tmp);
		}
		bool flag=false;
		for (int i=0;i<n;i++)
			for (int j=i;j<n;j++)
				for(int k=j+1;k<n;k++){
					if (v[i]<v[j] && v[k]<v[j]) {
						cout<<"yes\n"<<i<<" "<<j<<" "<<k<<endl;
						i=n;j=n;k=n;
						flag=true;
					}
				}
					if (flag) continue;
					else cout<<"no\n";
	}
}


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

int main(){
	int t;
	cin >> t;
	while(t--){
		vector<int> v;
		int n;cin >> n;
		int tmp;
		for (int i=0;i<n; i++) {
			cin >> tmp;
			v.push_back(tmp);
		}
		bool flag=false;
		tmp=n;
		for (int i=0;i<n;i++)
			if (v[i]==tmp){
				tmp--;continue;
			}
			else if(v[i]==tmp-1&&v[n-1]==tmp) {
				tmp-=2;continue;
			}
			else for (int j=i+1;j<n;j++)
				if (v[i]<v[j])
				for(int k=j+1;k<n;k++){
					if (v[k]<v[j]) {
						cout<<"yes\n"<<i+1<<" "<<j+1<<" "<<k+1<<endl;
						i=n;j=n;k=n;
						flag=true;
					}
				}
					if (flag) continue;
					else cout<<"no\n";
	}
}


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

int main(){
	int t;
	cin >> t;
	while(t--){
		vector<int> v;
		int n;cin >> n;
		int tmp;
		for (int i=0;i<n; i++) {
			cin >> tmp;
			v.push_back(tmp);
		}
		bool flag=false;
		for (int i=0;i<n;i++)
			for (int j=i;j<n;j++)
				for(int k=j+1;k<n;k++){
					if (v[i]<v[j] && v[k]<v[j]) {
						cout<<"yes\n"<<i+1<<" "<<j+1<<" "<<k+1<<endl;
						i=n;j=n;k=n;
						flag=true;
					}
				}
					if (flag) continue;
					else cout<<"no\n";
	}
}


#pragma comment(linker, "/STACK:36777216")
#define  _CRT_SECURE_NO_WARNINGS
#include <cinttypes>
#include <inttypes.h>
#include <numeric>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <map>
#include <utility>
#include <cmath>
#include <algorithm>
#include <set>
#include <stack>
#include <string.h>
#include <list>
#include <queue>
#include <bitset>
#include <functional>

#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vpii vector<pii>
#define ll long long

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

using namespace std;

const int INF = 1000000000;

int nxi() { int a; cin >> a; return a; }

vector<ll> a;
void inc(int i, ll v) {
	for (; i < a.size(); i |= i + 1) {
		a[i] = max(a[i], v);
	}
}

long long get(int r) {
	long long ans = 0;
	for (; r >= 0; r = (r & (r + 1)) - 1) {
		ans = max(ans, a[r]);
	}
	return ans;
}

long long get(int l, int r) {
	return get(r) - get(l - 1);
}

template<class _T>
_T gcd(_T a, _T b) { return a == 0 ? b : gcd(b % a, a); }

#define EPS 1e-11
#define MOD 1000000007

ll bin_pow(ll a, ll p) {
	ll res = 1;
	while (p > 0) {
		if (p & 1) res = (res * a) % MOD;
		p /= 2;
		a = (a * a) % MOD;
	}

	return res;
}

vi pr;
vi lp;
auto grais = [&](int n) {
	lp.assign(n + 1, 0);
	for (int i = 2; i <= n; i++) {
		if (lp[i] == 0) {
			lp[i] = i;
			pr.push_back(i);
		}
		for (int j = 0; j < pr.size() && pr[j] <= lp[i] && pr[j] * i <= n; j++)
			lp[pr[j] * i] = pr[j];
	}
};

int main() {

#ifdef _DEBUG
	freopen("sort.in", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);

	int t = nxi();
	for (int _T = 0; _T < t; _T++) {
		int n = nxi();
		vi a(n);
		for (int& v : a) cin >> v;

		bool ok = false;
		int i;
		for (i = 1; i < n - 1; i++) {
			if (a[i - 1] < a[i] && a[i] > a[i + 1]) {
				ok = true;
				break;
			}
		}

		if (ok) { cout << "YES\n" << (i) << ' ' << i + 1 << ' ' << i + 2 << endl; }
		else {
			cout << "NO\n";
		}
	}
	return 0;

}


#pragma comment(linker, "/STACK:36777216")
#define  _CRT_SECURE_NO_WARNINGS
#include <cinttypes>
#include <inttypes.h>
#include <numeric>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <map>
#include <utility>
#include <cmath>
#include <algorithm>
#include <set>
#include <stack>
#include <string.h>
#include <list>
#include <queue>
#include <bitset>
#include <functional>

#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vpii vector<pii>
#define ll long long

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

using namespace std;

const int INF = 1000000000;

int nxi() { int a; cin >> a; return a; }

vector<ll> a;
void inc(int i, ll v) {
	for (; i < a.size(); i |= i + 1) {
		a[i] = max(a[i], v);
	}
}

long long get(int r) {
	long long ans = 0;
	for (; r >= 0; r = (r & (r + 1)) - 1) {
		ans = max(ans, a[r]);
	}
	return ans;
}

long long get(int l, int r) {
	return get(r) - get(l - 1);
}

template<class _T>
_T gcd(_T a, _T b) { return a == 0 ? b : gcd(b % a, a); }

#define EPS 1e-11
#define MOD 1000000007

ll bin_pow(ll a, ll p) {
	ll res = 1;
	while (p > 0) {
		if (p & 1) res = (res * a) % MOD;
		p /= 2;
		a = (a * a) % MOD;
	}

	return res;
}

vi pr;
vi lp;
auto grais = [&](int n) {
	lp.assign(n + 1, 0);
	for (int i = 2; i <= n; i++) {
		if (lp[i] == 0) {
			lp[i] = i;
			pr.push_back(i);
		}
		for (int j = 0; j < pr.size() && pr[j] <= lp[i] && pr[j] * i <= n; j++)
			lp[pr[j] * i] = pr[j];
	}
};

int main() {

#ifdef _DEBUG
	freopen("sort.in", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);

	int t = nxi();
	for (int _T = 0; _T < t; _T++) {
		int n = nxi();
		vi a(n);
		for (int& v : a) cin >> v;

		bool ok = false;
		int i;
		for (i = 1; i < n - 1; i++) {
			if (a[i - 1] < a[i] && a[i] > a[i + 1]) {
				ok = true;
			}
		}

		if (ok) { cout << "YES\n" << (i) << ' ' << i + 1 << ' ' << i + 2 << endl; }
		else {
			cout << "NO\n";
		}
	}
	return 0;

}


#include<iostream>
#include<vector>
using namespace std;
int main(){
    int t;
    cin>>t;
    while(t--){
    int n;
    cin>>n;
    vector<int> v(n);
    int idx;
    for(idx=0;idx<n;idx++){
        cin>>v[idx];

}
 int i=1,j=0,k=0,min=v[0],max=0,flag=0,output=0;
 for(idx=0;idx<n;idx++){

        if((v[idx]<min)&&(max==0)){
             min=v[idx];
             i=idx+1;

        }
             if(v[idx]>min){
                if(!flag){
                    max=v[idx];
                    j=idx+1;
                    flag++;
                }
                 if(v[idx]>max){ max=v[idx];j=idx+1;}

             }
             if(v[idx]<max){
                 output=1;
                 k=idx+1;
                 break;
             }

        }
        if(output==1)cout<<"YES\n"<<i<<" "<<j<<" "<<k<<"\n";
        else cout<<"NO\n";

}
    return 0;
}


#include<stdio.h>
#include<string.h>
int main()
{
	int t,n,a[1001],minl[1001],minr[1001],tag,i,j;
	scanf("%d",&t);
	for(i=1;i<=t;i++)
	{
		scanf("%d",&n);
		memset(minl,0,sizeof(minl));
		memset(minr,0,sizeof(minr));
		for(j=1;j<=n;j++)
			scanf("%d",&a[j]);
		minl[1]=a[1];
		for(j=2;j<=n;j++)
			if(a[j]<minl[j-1])
				minl[j]=a[j];
			else
				minl[j]=minl[j-1];

		minr[n]=a[n];
		for(j=n-1;j>=1;j--)
			minr[j]=a[j]<minr[j+1]?a[j]:minr[j+1];

		tag=0;
		for(j=2;j<=n-1;j++)
			if(a[j]>minl[j-1]&&a[j]>minr[j+1])
			{
				tag=1;
				break;
			}
		if(!tag)
			printf("NO\n");
		else
			printf("YES\n%d %d %d\n",j-1,j,j+1);
	}
	return 0;
}


#include<stdio.h>
int main()
{
	int t,n,a[1001],minl[1001],minr[1001],tag,i,j;
	scanf("%d",&t);
	for(i=1;i<=t;i++)
	{
		scanf("%d",&n);
		for(j=1;j<=n;j++)
			scanf("%d",&a[j]);
		minl[1]=a[1];
		for(j=2;j<=n;j++)
			if(a[j]<minl[j-1])
				minl[j]=a[j];
			else
				minl[j]=minl[j-1];

		minr[n]=a[n];
		for(j=n-1;j>=1;j--)
			minr[j]=a[j]<minr[j+1]?a[j]:minr[j+1];

		tag=0;
		for(j=2;j<=n-1;j++)
			if(a[j]>minl[j-1]&&a[j]>minr[j+1])
			{
				tag=1;
				break;
			}
		if(!tag)
			printf("NO\n");
		else
			printf("YES\n%d %d %d\n",minl[j-1],a[j],minr[j+1]);
	}
	return 0;
}


    #include <iostream>
    #include <cstring>
    #include <string>
    #include <stdio.h>
    #include <bitset>
    #include <unordered_map>
    #include <cmath>
    #include <vector>
    #include <algorithm>
    #define ll long long
    using namespace std;
    int main(){
        int t;
        cin>>t;
        int arr[1005];
        while(t--){
            int n;
            cin>>n;
            int max=n,min=1;
            for (int i=0;i<n;i++){
                cin>>arr[i];
            }
            int i=-1,j=-1,k=-1;
            for (int x=0;x<n;x++){
                int val=arr[x];
                for  (int y=x+1;y<n;y++){
                    if (arr[y]>val){
                        int temp=arr[y];
                        for (int z=y+1;z<n;z++){
                            if (arr[z]<temp){
                                k=z;
                                j=y;
                                i=x;
                                break;
                            }
                        }
                        if (j!=-1)
                            break;
                    }
                }
                if(i!=-1)
                    break;
            }
            if(i==-1)
                cout<<"NO"<<endl;
            else{
                cout<<"YES"<<endl;
                cout<<i+1<<" "<<j+1<<" "<<k+1<<endl;

            }
        }
        return 0;
    }


    #include <iostream>
    #include <cstring>
    #include <string>
    #include <stdio.h>
    #include <bitset>
    #include <unordered_map>
    #include <cmath>
    #include <vector>
    #include <algorithm>
    #include <map>
    #define ll long long
    using namespace std;
    int main(){
        int t;
        cin>>t;
        int arr[1005];
        int loc[1005];
        while(t--){
            int n;
            cin>>n;
            int max=n,min=1;
            for (int i=0;i<n;i++){
                cin>>arr[i];
                loc[arr[i]]=i;
            }
            int a=-1,b=-1,c=-1;
            for (int i=max;i>=1;i--){
                int l=loc[i];
                for (int j=i-1;j>=1;j--){
                    if (loc[j]>l){
                        c=loc[j];
                        break;
                    }
                }
                if (c!=-1){
                    for (int j=i-1;j>=1;j--){
                        if (loc[j]<l){
                            a=loc[j];
                            break;
                        }
                    }
                    if (a!=-1){
                        b=l;
                        break;
                    }
                    else
                    {
                        c=-1;
                    }
                }
            }
            if (b==-1){
                cout<<"NO"<<endl;
            }
            else{
                cout<<"YES"<<endl<<a+1<<" "<<b+1<<" "<<c+1<<endl;
            }
        }
        return 0;
    }


    #include <iostream>
    #include <cstring>
    #include <string>
    #include <stdio.h>
    #include <bitset>
    #include <unordered_map>
    #include <cmath>
    #include <vector>
    #include <algorithm>
    #define ll long long
    using namespace std;
    int main(){
        int t;
        cin>>t;
        int arr[1005];
        while(t--){
            int n;
            cin>>n;
            int max=n,min=1;
            for (int i=0;i<n;i++){
                cin>>arr[i];
            }
            int i=-1,j=-1,k=-1;
            for (int x=0;x<n;x++){
                int val=arr[x];
                for  (int y=x+1;y<n;y++){
                    if (arr[y]>val){
                        int temp=arr[y];
                        for (int z=y+1;z<n;z++){
                            if (arr[z]<temp){
                                k=z;
                                j=y;
                                i=x;
                                break;
                            }
                        }
                        if (j!=-1)
                            break;
                    }
                }
                if(i!=-1)
                    break;
            }
            if(i==-1)
                cout<<"NO"<<endl;
            else
                cout<<i+1<<" "<<j+1<<" "<<k+1<<endl;
        }
        return 0;
    }


#include<iostream>
#include<math.h>
#include<string>
#include<time.h>
#include<algorithm>

using namespace std;

int main() {

	register int a[1005], t, n, i, j, k, flag = 0, q, w;
	cin >> t;
	while (t != 0)
	{
		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> a[i];
		}
		for (i = 0; i < n; i++)
		{
			for (j = i + 1; j < n; j++) {
				if (a[i] < a[j])
					for (k = j + 1; k < n; k++)
					{
						if (a[j] > a[k]) flag = 1;
						break;
					}
				if (flag) break;
			}
			if (flag) break;
		}

		if (!flag)cout << "NO\n";
		else cout << "YES\n" << i+1 << " " << j+1 << " " << k+1 << endl;

		flag = 0;
		t--;
	}

}


#include<iostream>
#include<math.h>
#include<string>
#include<time.h>
#include<algorithm>

using namespace std;

int main() {

	register int a[1005], t, n, i, j, k, flag = 0, q, w;
	cin >> t;
	while (t != 0)
	{
		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> a[i];
		}
		for (i = 0; i < n; i++)
		{
			for (j = i + 1; j < n; j++) {
				if (a[i] < a[j])
					for (k = j + 1; k < n; k++)
					{
						if (a[j] > a[k]) flag = 1;
						break;
					}
				if (flag) break;
			}
			if (flag) break;
		}

		if (!flag)cout << "NO\n";
		else cout << "YES\n" << a[i]<< " " << a[j] << " " << a[k] << endl;

		flag = 0;
		t--;
	}

}


#include<iostream>
#include<math.h>
#include<string>
#include<time.h>
#include<algorithm>

using namespace std;

int main() {

	register int a[1005], t, n, i, j, k, flag = 0, q, w;
	cin >> t;
	while (t != 0)
	{
		cin >> n;
		for (i = 0; i < n; i++)
		{
			cin >> a[i];
		}
		for (i = 0; i < n; i++)
		{
			for (j = i + 1; j < n; j++) {
				if (a[i] < a[j])
					for (k = j + 1; k < n; k++)
					{
						if (a[j] > a[k]) flag = 1;
						break;
					}
				if (flag) break;
			}
			if (flag) break;
		}

		if (!flag)cout << "NO\n";
		else cout << "YES\n" << i<< " " << j << " " << k << endl;

		flag = 0;
		t--;
	}

}


#include<iostream>
#include<math.h>
#include<string>
#include<time.h>
#include<algorithm>

using namespace std;

int main() {

	register int a[1005], t, n, i, j, k, flag=0, q, w;
	cin >> t;
	while (t!=0)
	{
		cin >> n;
		for ( i = 0; i < n; i++)
		{
			cin >> a[i];
		}
		for ( i = 0; i < n; i++)
		{
			for (j = i+1; j < n; j++) {
				if (a[i] < a[j])
					for ( k = j + 1; k < n; k++)
				    {
						if (a[j] > a[k]) flag = 1;
						break;
				    }
				if (flag) break;
			}
			if (flag) break;
		}
		q = min(a[i], a[k]); w = max(a[i], a[k]);
		if(!flag)cout << "NO\n";
		else cout << "YES\n" << q <<" " << w <<" "<< a[j] << endl;

		flag = 0;
		t--;
	}

}


#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <cmath>
#include <sstream>

using namespace std;

#define REP(i, a, b) for(int i = a; i < b; i++)
#define REPN(i, b) REP(i, 0, b)
#define REPE(i, a, b) for(int i = a; i <= b; i++)
#define endl "\n"
//void printArray(int*, int);

int main()
{
	int n;
	string res;
	cin >> n;
	while (n-- > 0)
	{
		int pn, oc = 0;
		cin >> pn;
		int* p = new int[pn];
		REPN(i, pn) cin >> p[i];

		int pre, cur, nex;
		string perm;
		REP(i, 0, pn - 2) {
			pre = p[i];
			cur = p[i + 1];
			nex = p[i + 2];

			if (cur > pre && cur > nex) {
				oc++;
				perm = to_string(i + 1) + " " + to_string(i + 2) + " " + to_string(i + 3) + "\n";
			}
		}
		if (oc == 0)
			res += "NO\n";
		else
			res += "YES\n" + perm;
	}
	cout << res;
}

//void printArray(int* arr, int n) {
//	REPN(i, n) cout << arr[i] << " ";
//}


#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <cmath>
#include <sstream>

using namespace std;

#define REP(i, a, b) for(int i = a; i < b; i++)
#define REPN(i, b) REP(i, 0, b)
#define REPE(i, a, b) for(int i = a; i <= b; i++)
#define endl "\n"
//void printArray(int*, int);

void solve() {

	int pn, oc = 0;
	cin >> pn;
	int* p = new int[pn];
	REPN(i, pn) cin >> p[i];

	REP(i, 0, pn - 2) {
		if (p[i + 1] > p[i] && p[i + 1] > p[i + 2]) {
			cout << "YES\n";
			cout << to_string(i + 1) + " " + to_string(i + 2) + " " + to_string(i + 3) + "\n";
		}
	}
	cout << "NO\n";
}

int main()
{
	int n;
	string res;
	cin >> n;
	while (n--)
		solve();
}

//void printArray(int* arr, int n) {
//	REPN(i, n) cout << arr[i] << " ";
//}


#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <cmath>
#include <sstream>

using namespace std;

#define REP(i, a, b) for(int i = a; i < b; i++)
#define REPN(i, b) REP(i, 0, b)
#define REPE(i, a, b) for(int i = a; i <= b; i++)
#define endl "\n"
//void printArray(int*, int);

int main()
{
	int n;
	string res;
	cin >> n;
	while (n-- > 0)
	{
		int pn, oc = 0;
		cin >> pn;
		int* p = new int[pn];
		REPN(i, pn) cin >> p[i];

		int pre, cur, nex;
		string perm;
		REP(i, 0, pn - 2) {
			pre = p[i];
			cur = p[i + 1];
			nex = p[i + 2];

			if (cur > pre && cur > nex) {
				oc++;
				perm = to_string(pre) + " " + to_string(cur) + " " + to_string(nex) + "\n";
			}
		}
		if (oc == 0)
			res += "NO\n";
		else
			res += "YES\n" + perm;
	}
	cout << res;
}

//void printArray(int* arr, int n) {
//	REPN(i, n) cout << arr[i] << " ";
//}


#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <cmath>
#include <sstream>

using namespace std;

#define REP(i, a, b) for(int i = a; i < b; i++)
#define REPN(i, b) REP(i, 0, b)
#define REPE(i, a, b) for(int i = a; i <= b; i++)
#define endl "\n"
//void printArray(int*, int);

void solve(string* res) {

	int pn, oc = 0;
	cin >> pn;
	int* p = new int[pn];
	REPN(i, pn) cin >> p[i];

	int pre, cur, nex;
	string perm;
	REP(i, 0, pn - 2) {
		if (p[i + 1] > p[i] && p[i + 1] > p[i + 2]) {
			oc++;
			perm = to_string(i + 1) + " " + to_string(i + 2) + " " + to_string(i + 3) + "\n";
		}
	}
	if (oc == 0)
		res->append("NO\n");
	else
		res->append("YES\n" + perm);
}

int main()
{
	int n;
	string res;
	cin >> n;
	while (n--)
		solve(&res);
	cout << res;
}

//void printArray(int* arr, int n) {
//	REPN(i, n) cout << arr[i] << " ";
//}


#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <cmath>
#include <sstream>

using namespace std;

#define REP(i, a, b) for(int i = a; i < b; i++)
#define REPN(i, b) REP(i, 0, b)
#define REPE(i, a, b) for(int i = a; i <= b; i++)
#define endl "\n"
//void printArray(int*, int);

int main()
{
	int n;
	string res;
	cin >> n;
	while (n-- > 0)
	{
		int pn, oc = 0;
		cin >> pn;
		int* p = new int[pn];
		REPN(i, pn) cin >> p[i];

		int pre, cur, nex;
		string perm;
		REP(i, 0, pn - 2) {
			pre = p[i];
			cur = p[i + 1];
			nex = p[i + 2];

			if (cur > pre && cur > nex) {
				oc++;
				perm = to_string(i) + " " + to_string(i+1) + " " + to_string(i+2) + "\n";
			}
		}
		if (oc == 0)
			res += "NO\n";
		else
			res += "YES\n" + perm;
	}
	cout << res;
}

//void printArray(int* arr, int n) {
//	REPN(i, n) cout << arr[i] << " ";
//}


#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <cmath>
#include <sstream>
#include "FindingOptimalSolution.cpp"

using namespace std;

#define REP(i, a, b) for(int i = a; i < b; i++)
#define REPN(i, b) REP(i, 0, b)
#define REPE(i, a, b) for(int i = a; i <= b; i++)
#define endl "\n"
//void printArray(int*, int);

int main()
{
	int n;
	string res;
	cin >> n;
	while (n-- > 0)
	{
		int pn, oc = 0;
		cin >> pn;
		int* p = new int[pn];
		REPN(i, pn) cin >> p[i];

		int pre, cur, nex;
		string perm;
		REP(i, 0, pn - 2) {
			pre = p[i];
			cur = p[i + 1];
			nex = p[i + 2];

			if (cur > pre && cur > nex) {
				oc++;
				perm = to_string(pre) + " " + to_string(cur) + " " + to_string(nex) + "\n";
			}
		}
		if (oc == 0)
			res += "NO\n";
		else
			res += "YES\n" + perm;
	}
	cout << res;
}

//void printArray(int* arr, int n) {
//	REPN(i, n) cout << arr[i] << " ";
//}


#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
using namespace std;
#define ll long long
int arr[1003];
int main(){
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        for(int i=0;i<n;i++)
            cin>>arr[i];
            int b=-1;
        for(int i=1;i<n-1;i++){
            if(arr[i]>arr[i-1]&&arr[i]>arr[i+1]){
                b=i;
                break;
            }
        }

        if(b==-1) cout<<"NO\n";
        else cout<<"YES\n"<<b<<' '<<b+1<<' '<<b+2<<endl;
    }

    return 0;
}


#include <iostream>

using namespace std;

void solve()
{
	int ans[3];
	int ind = 0;
	int n;
	cin >> n;
	int cur, prev;
	cin >> cur;
	for (int i = 1; i < n; i++)
	{
		prev = cur;
		cin >> cur;

		if (ind == 0)
		{
			if (cur > prev)
			{
				ans[0] = i - 1;
				ind++;
			}
		}
		if (ind == 1)
		{
			if (cur < prev)
			{
				ans[1] = i - 1;
				ans[2] = i;
				ind = 3;
			}
		}

	}
	if (ind != 3)
	{
		cout << "NO" << endl;
	}
	else
	{
		cout << "YES" << endl;
		for (int i = 0; i < 3; i++)
		{
			cout << ans[i] + 1 << " ";
		}
		cout << endl;
	}
}

int main()
{
	int t;
	cin >> t;
	for (int tt = 0; tt < t; tt++)
	{
		solve();
	}
	return 0;
}


#include <iostream>

using namespace std;

void solve()
{
	int ans[3];
	int ind = 0;
	int n;
	cin >> n;
	int cur, prev;
	cin >> cur;
	for (int i = 1; i < n; i++)
	{
		prev = cur;
		cin >> cur;

		if (ind == 0)
		{
			if (cur > prev)
			{
				ans[0] = i - 1;
				ind++;
			}
		}
		if (ind == 1)
		{
			if (cur < prev)
			{
				ans[1] = i - 1;
				ans[2] = i;
				ind = 3;
				break;
			}
		}

	}
	if (ind != 3)
	{
		cout << "NO" << endl;
	}
	else
	{
		cout << "YES" << endl;
		for (int i = 0; i < 3; i++)
		{
			cout << ans[i] + 1 << " ";
		}
		cout << endl;
	}
}

int main()
{
	int t;
	cin >> t;
	for (int tt = 0; tt < t; tt++)
	{
		solve();
	}
	return 0;
}


#include <iostream>

using namespace std;

void solve()
{
	int ans[3];
	int ind = 0;
	int n;
	cin >> n;
	int cur, prev;
	cin >> cur;
	for (int i = 1; i < n; i++)
	{
		prev = cur;
		cin >> cur;

		if (ind == 0)
		{
			if (cur > prev)
			{
				ans[0] = i - 1;
				ind++;
			}
		}
		if (ind == 1)
		{
			if (cur < prev)
			{
				ans[1] = i - 1;
				ans[2] = i;
				ind = 3;
				break;
			}
		}

	}
	if (ind != 3)
	{
		cout << "NO" << endl;
	}
	else
	{
		cout << "YES" << endl;
		for (int i = 0; i < 3; i++)
		{
			cout << ans[i] + 1 << " ";
		}
	}
}

int main()
{
	int t;
	cin >> t;
	for (int tt = 0; tt < t; tt++)
	{
		solve();
	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

int main() {
	long long n, ct, t;

	cin >> t;
	while (t--) {
		cin >> n;
		ct = 0;
		int pt = 0;
		int ans = 0;
		int ind = 0;
		int* A = new int[n];
		for (int i = 0; i < n; i++) {
			cin >> A[i];
		}
		for (int i = 0; i < n - 1; i++) {
			if (A[i] < A[i + 1]) {
				ct++;
			}
			else {
				if (A[i] > A[i + 1]) {
					if (ct > 0) {
						ans++;
						ind = i;
					}
				}
				ct = 0;
			}

		}
		if (ans > 0) {
			cout << "YES" << endl;
			cout << A[ind - 1] << " " << A[ind] << " " << A[ind + 1] << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

int main() {
	long long n, ct, t;

	cin >> t;
	while (t--) {
		cin >> n;
		ct = 0;
		int pt = 0;
		int ans = 0;
		int ind = 0;
		int* A = new int[n];
		for (int i = 0; i < n; i++) {
			cin >> A[i];
		}
		for (int i = 0; i < n - 1; i++) {
			if (A[i] < A[i + 1]) {
				ct++;
			}
			else {
				if (A[i] > A[i + 1]) {
					if (ct > 0) {
						ans++;
						ind = i;
					}
				}
				ct = 0;
			}

		}
		if (ans > 0) {
			cout << "YES" << endl;
			cout << ind - 1 << " " << ind << " " << ind + 1 << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

void ctor() {
	int n; cin >> n;
	int* A = new int[n];
	for (int i = 0; i < n; i++)
		cin >> A[i];
	for (int i = 1; i < n - 1; i++) {
		if (A[i-1]<A[i] && A[i]>A[i + 1]) {
			cout << "YES" << endl;
			cout << i << " " << i + 1 << " " << i + 2  << endl;
			return;
		}
	}
	cout << "NO" << endl;
}

int main() {
	int t; cin >> t;
	while (t--) {
		ctor();
	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

void ctor() {
	int n; cin >> n;
	int* A = new int[n];
	for (int i = 0; i < n; i++)
		cin >> A[i];
	for (int i = 1; i < n - 1; i++) {
		if (A[i]<A[i + 1] && A[i + 1]>A[i + 2]) {
			cout << "YES" << endl;
			cout << i << " " << i + 1 << " " << i + 2  << endl;
			return;
		}
	}
	cout << "NO" << endl;
}

int main() {
	int t; cin >> t;
	while (t--) {
		ctor();
	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

int main() {
	int ind1, ind2, ans = 0;
	int t; cin >> t;
	while (t--) {
		int ct, pt;
		ct = pt = ans = 0;
		int n; cin >> n;
		int* A = new int[n];
		for (int i = 0; i < n; i++)
		{
			cin >> A[i];

		}
		for (int i = 0; i < n - 1; i++) {
			if (A[i] < A[i + 1]) {
				ct++;
				if (pt > 0) {
					ind1 = i + 1;
					ans++;
					pt = 0;
				}
			}
			else if (A[i] > A[i + 1]) {
				pt++;
				if (ct > 0) {
					ans++;
					ct = 0;
					ind2 = i + 2;
				}
			}
		}
		if (ans > 1) {
			cout << "YES" << endl;
			cout << ind1 << " " << ind1 + 1 << " " << ind2 << endl;
		}
		else cout << "NO" << endl;

	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

int main() {
	long long n, ct, t;

	cin >> t;
	while (t--) {
		cin >> n;
		ct = 0;
		int pt = 0;
		int ans = 0;
		int ind = 0;
		int* A = new int[n];
		for (int i = 0; i < n; i++) {
			cin >> A[i];
		}
		for (int i = 0; i < n - 1; i++) {
			if (A[i] < A[i + 1]) {
				ct++;
				pt = 0;
			}
			else {
				if (A[i] > A[i + 1]) {
					pt++;
					if (pt = 1 && ct > 0) {
						ans++;
						ind = i;
					}
				}
				ct = 0;
			}

		}
		if (ans > 0) {
			cout << "YES" << endl;
			cout << ind - 2 << " " << ind - 1 << " " << ind << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <string>
#include <sstream>
#include <cctype>
#include <cmath>
#include <clocale>
#include <conio.h>
#include <algorithm>
using namespace std;
const int MM = 2e5 + 9;

int main() {
	long long n, ct, t;

	cin >> t;
	while (t--) {
		cin >> n;
		ct = 0;
		int pt = 0;
		int ans = 0;
		int ind = 0;
		int* A = new int[n];
		for (int i = 0; i < n; i++) {
			cin >> A[i];
		}
		for (int i = 0; i < n - 1; i++) {
			if (A[i] > A[i + 1]) {
				ct++;
				pt = 0;
			}
			else ct = 0;

			if (A[i] < A[i + 1]) {
				pt++;
			}
			if (pt = 1 && ct > 1) {
				ans++;
				ind = i;
			}
		}
		if (ans > 0) {
			cout << "YES" << endl;
			cout << ind - 2 << " " << ind - 1 << " " << ind;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}


#include <iostream>
#include <string>

static bool opposite(char d1, char d2)
{
	switch (d1) {
	case 'U': return d2 == 'D';
	case 'D': return d2 == 'U';
	case 'L': return d2 == 'R';
	case 'R': return d2 == 'L';
	}
}

int main()
{
	std::ios_base::sync_with_stdio(false);
	long n;
	std::cin >> n;

	std::string s;
	std::getline(std::cin >> std::ws, s);

	long ans = 0;
	for (long i = 0; i != n;){
		const char d1 = s[i++];
		while (i != n && s[i] == d1)
			++i;

		if (i == n || opposite(d1, s[i])) {
			++ans;
			continue;
		}

		const char d2 = s[i++];
		while (i != n && (s[i] == d1 || s[i] == d2))
			++i;
		++ans;
	}
	std::cout << ans << "\n";

	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
#define sc scanf
#define pf printf
#define pi 3.141592653589793
#define pb push_back
#define debug(x) cout<<x<<endl;
#define    getI(a)           scanf("%d", &a)
#define    getII(a,b)       scanf("%d %d", &a,&b);
#define    getL(a)         scanf("%lld",&a)
#define    getLL(a,b)        scanf("%lld%lld",&a,&b)
int arr[1000009],brr[1000009];
int main()
{
   map<char,int>op;
   op['L']='R';
    op['R']='L';
     op['U']='D';
      op['D']='U';
      vector<char>v;
      int n,cnt=0;
      cin>>n;
      string str,str2;
      cin>>str;
      v.pb(str[0]);
    for(int i=1;i<n;i++)
    {
        int flag=0;
        for(int j=0;j<v.size();j++)
        {
            if(str[i]==op[v[j]])
            {
                cnt++;
               // cout<<str[i]<<" "<<v[j]<<" "<<i<<endl;
                v.clear();
                v.pb(str[i]);
                flag=1;
                break;
            }

        }
        if(flag==0) v.pb(str[i]);
        }

    cout<<cnt+1<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
#define sc scanf
#define pf printf
#define pi 3.141592653589793
#define pb push_back
#define debug(x) cout<<x<<endl;
#define    getI(a)           scanf("%d", &a)
#define    getII(a,b)       scanf("%d %d", &a,&b);
#define    getL(a)         scanf("%lld",&a)
#define    getLL(a,b)        scanf("%lld%lld",&a,&b)
int arr[1000009],brr[1000009];
int main()
{
   map<char,int>op;
   map<char,int>mp;
   op['L']='R';
    op['R']='L';
     op['U']='D';
      op['D']='U';
      vector<char>v;
      int n,cnt=0;
      cin>>n;
      string str,str2;
      cin>>str;
      v.pb(str[0]);
      mp[str[0]]=1;
    for(int i=1;i<n;i++)
    {
        int flag=0;
        for(int j=0;j<v.size();j++)
        {
            if(str[i]==op[v[j]])
            {
                cnt++;
               // cout<<str[i]<<" "<<v[j]<<" "<<i<<endl;
                v.clear();
                mp.clear();
                v.pb(str[i]);
                mp[str[i]]=1;
                flag=1;
                break;
            }

        }
        if(flag==0&&mp[str[i]]==0) {v.pb(str[i]);
        mp[str[i]]=1;
        }
        }

    cout<<cnt+1<<endl;
}


#include<algorithm>
#include<assert.h>
#include<bitset>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<deque>
#include<iostream>
#include<map>
#include<memory.h>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<string>
#include<utility>
#include<vector>

using namespace std;

#define LL long long int

typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<double> VD;
typedef vector<string> VS;
typedef vector<VI> VVI;
typedef vector<VLL> VVLL;
typedef vector<VD> VVD;
typedef vector<VS> VVS;
typedef pair<int,int> PI;
typedef vector<pair<int,int> > VPI;
typedef pair<double,double> PD;

#define SI ({int _x; scanf("%d",&_x); _x;})
#define SC ({char _x; scanf("%c",&_x); _x;})
#define SLL ({LL _x; scanf("%lld",&_x); _x;})
#define SLF ({double _x; scanf("%lf",&_x); _x;})
#define PI(x) printf("%d",x)
#define PC(x) printf("%c",x)
#define PLL(x) printf("%lld",x)
#define PLF(x) printf("%lf",x)
#define PS(x) printf("%s",x)
#define P32() printf(" ")
#define P10() printf("\n")
#define lc(i) (i<<1)
#define rc(i) ((i<<1)+1)
#define iscan(n) scanf("%d",&n)
#define cscan(n) scanf("%c",&n)
#define llscan(n) scanf("%lld",&n)
#define lfscan(n) scanf("%lf",&n)
#define sscan(n) scanf("%s",n)
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define FORD(i,a,b) for(int i=b-1;i>=a;--i)
#define REP(i,b) for(int i=0;i<b;++i)
#define REPD(i,b) for(int i=b-1;i>=0;--i)
#define MP(a,b) make_pair(a,b)
#define PB(a) push_back(a)
#define FILL(a,b) memset(a,b,sizeof a)
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)<0?-(a):(a))
#define ALL(a) a.begin(),a.end()
#define SORT(a) sort(ALL(a))
#define TR(i,c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

bool isHorizontal(char ch)
{
	return ch == 'L' || ch == 'R';
}

bool isVertical(char ch)
{
	return ch == 'U' || ch == 'D';
}

int main()
{
	int N = SI;
	string s;
	cin >> s;

	int i = 0, cnt = 0;
	while (i < s.length())
	{
		if (isHorizontal(s[i]))
		{
			char prevh = s[i];
			while (i < s.length() && s[i] == prevh)
			{
				++i;
			}

			if (i == s.length())
			{
				break;
			}

			if (isHorizontal(s[i]))
			{
			}
			else
			{
				char prevv = s[i];
				while (i < s.length() && (s[i] == prevh || s[i] == prevv))
				{
					++i;
				}

				if (i == s.length())
				{
					break;
				}
			}
		}
		else
		{
			char prevv = s[i];
			while (i < s.length() && s[i] == prevv)
			{
				++i;
			}

			if (i == s.length())
			{
				break;
			}

			if (isHorizontal(s[i]))
			{
				char prevh = s[i];
				while (i < s.length() && (s[i] == prevh || s[i] == prevv))
				{
					++i;
				}

				if (i == s.length())
				{
					break;
				}
			}
		}

		++cnt;
		//cout << "New starts at " << i << " " << s[i] << " and count is " << cnt << endl;
	}

	cout << cnt+1 << endl;

	return 0;
}


#include<algorithm>
#include<assert.h>
#include<bitset>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<deque>
#include<iostream>
#include<map>
#include<memory.h>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<string>
#include<utility>
#include<vector>

using namespace std;

#define LL long long int

typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<double> VD;
typedef vector<string> VS;
typedef vector<VI> VVI;
typedef vector<VLL> VVLL;
typedef vector<VD> VVD;
typedef vector<VS> VVS;
typedef pair<int,int> PI;
typedef vector<pair<int,int> > VPI;
typedef pair<double,double> PD;

#define SI ({int _x; scanf("%d",&_x); _x;})
#define SC ({char _x; scanf("%c",&_x); _x;})
#define SLL ({LL _x; scanf("%lld",&_x); _x;})
#define SLF ({double _x; scanf("%lf",&_x); _x;})
#define PI(x) printf("%d",x)
#define PC(x) printf("%c",x)
#define PLL(x) printf("%lld",x)
#define PLF(x) printf("%lf",x)
#define PS(x) printf("%s",x)
#define P32() printf(" ")
#define P10() printf("\n")
#define lc(i) (i<<1)
#define rc(i) ((i<<1)+1)
#define iscan(n) scanf("%d",&n)
#define cscan(n) scanf("%c",&n)
#define llscan(n) scanf("%lld",&n)
#define lfscan(n) scanf("%lf",&n)
#define sscan(n) scanf("%s",n)
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define FORD(i,a,b) for(int i=b-1;i>=a;--i)
#define REP(i,b) for(int i=0;i<b;++i)
#define REPD(i,b) for(int i=b-1;i>=0;--i)
#define MP(a,b) make_pair(a,b)
#define PB(a) push_back(a)
#define FILL(a,b) memset(a,b,sizeof a)
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)<0?-(a):(a))
#define ALL(a) a.begin(),a.end()
#define SORT(a) sort(ALL(a))
#define TR(i,c) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

int main()
{
	int N = SI;
	string s;
	cin >> s;
	int lastu = 0, lastr = 0, lastd = 0, lastl = 0;
	REP(i,N)
	{
		if (s[i] == 'R')
		{
			lastr = MAX(MAX(lastr, lastl+1), MAX(lastu, lastd));
		}
		else if (s[i] == 'L')
		{
			lastl = MAX(MAX(lastr+1, lastl), MAX(lastu, lastd));
		}
		else if (s[i] == 'D')
		{
			lastd = MAX(MAX(lastr, lastl), MAX(lastu+1, lastd));
		}
		else if (s[i] == 'U')
		{
			lastu = MAX(MAX(lastr, lastl), MAX(lastu, lastd+1));
		}

		//cout << s[i] << ": lastl=" << lastl << ", lastr=" << lastr << ", lastu=" << lastu << ", lastd=" << lastd << endl;
	}

	cout << MAX(MAX(lastr, lastl), MAX(lastu, lastd)) << endl;

	return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>
#include <cstring>
#include <set>
#include <queue>
#include <cctype>
#include <map>
#include <stack>
#include<cstdlib>
#include <sstream>
#include <deque>
#include<list>
#include<time.h>
#define ll long long
#define LL long long
#define inf 10000.00
#define iosfalse ios::sync_with_stdio(false);
#define INF 1e8
#define lowbit(x) x&-x
using namespace std;

int main()
{
    int n;
    string s;
    cin>>s;
    n=s.size();
    char pre=s[0],now;
    int ans=1;
    for(int i=0;i+1<s.size();i++)
    {
        now=s[i];
        if(i&&s[i-1]!=s[i])pre=s[i-1];
        if(now=='U'&&i+1<n&&s[i+1]=='D')
        ans++;
        else if(now=='D'&&i+1<n&&s[i+1]=='U')
        ans++;
        else if(now=='R'&&i+1<n&&s[i+1]=='L')
        ans++;
        else if(now=='L'&&i+1<n&&s[i+1]=='R')
        ans++;
    }
    pre=s[0];
    for(int i=0;i+1<s.size();i++)
    {
        now=s[i];
        if(i&&s[i-1]!=s[i])pre=s[i-1];
        if(i+1<n&&pre=='U'&&s[i+1]=='D'&&(now=='L'||now=='R'))
        ans++,i++;
        else if(i+1<n&&pre=='D'&&s[i+1]=='U'&&(now=='L'||now=='R'))
        ans++,i++;
        else if(i+1<n&&pre=='R'&&s[i+1]=='L'&&(now=='U'||now=='D'))
        ans++,i++;
        else if(i+1<n&&pre=='L'&&s[i+1]=='R'&&(now=='U'||now=='D'))
        ans++,i++;
    }
    cout<<ans<<endl;
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cmath>
#include <cstring>
#include <set>
#include <queue>
#include <cctype>
#include <map>
#include <stack>
#include<cstdlib>
#include <sstream>
#include <deque>
#include<list>
#include<time.h>
#define ll long long
#define LL long long
#define inf 10000.00
#define iosfalse ios::sync_with_stdio(false);
#define INF 1e8
#define lowbit(x) x&-x
using namespace std;

int main()
{
    int n;
    string s;
    cin>>n>>s;

    char pre=s[0],now;
    int ans=1;
    for(int i=0;i+1<s.size();i++)
    {
        now=s[i];
        if(i&&s[i-1]!=s[i])pre=s[i-1];
        if(now=='U'&&i+1<n&&s[i+1]=='D')
        ans++;
        else if(now=='D'&&i+1<n&&s[i+1]=='U')
        ans++;
        else if(now=='R'&&i+1<n&&s[i+1]=='L')
        ans++;
        else if(now=='L'&&i+1<n&&s[i+1]=='R')
        ans++;
    }
    pre=s[0];
    for(int i=0;i+1<s.size();i++)
    {
        now=s[i];
        if(i&&s[i-1]!=s[i])pre=s[i-1];
        if(i+1<n&&pre=='U'&&s[i+1]=='D'&&(now=='L'||now=='R'))
        ans++,i++;
        else if(i+1<n&&pre=='D'&&s[i+1]=='U'&&(now=='L'||now=='R'))
        ans++,i++;
        else if(i+1<n&&pre=='R'&&s[i+1]=='L'&&(now=='U'||now=='D'))
        ans++,i++;
        else if(i+1<n&&pre=='L'&&s[i+1]=='R'&&(now=='U'||now=='D'))
        ans++,i++;
    }
    cout<<ans<<endl;
    return 0;
}


//codeforces
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
using namespace std;
int main(){
	int n,k1,k2=-1,ans=1;
	char x;
	scanf ("%d\n%c",&n,&x);
	k1=x;
	while (--n){
		  scanf ("%c",&x);
		  if (k1==x||k2==x){
			 continue;
		  }
		  if (k1!=x&&k2==-1){
		  	 if ((k1=='L'&&x=='R')||(k1=='R'&&x=='L')||(k1=='U'&&x=='D')||(k1=='D'&&x=='U')){
				ans++;
			 	k1=x;
			 	k2=-1;
			 	continue;
			 }
			 else{
			 	  k2=x;
			 	  continue;
			 }
		  }
		  if (k1!=x&&k2!=x){
			 ans++;
			 k1=x;
			 k2=-1;
		  }
	}
	printf ("%d",ans);
	return 0;
}


#include <bits/stdc++.h>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define fr first
#define sc second
#define ll  long long
#define mp make_pair
#define mod 1000000007
#define eps 1e-8
#define inf 1e18
const double PI = acos(-1);

using namespace std;

int main(){
    ios::sync_with_stdio(0);
    int n;
    cin>>n;
    string s;
    cin>>s;
    int x=0,y=0;
    int res =0 ;
    bool l=0,r=0,u=0,d=0;
    for(int i=0 ; i<n ;i ++){
        if(s[i] == 'L'){
            if(r){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            l = 1;
        }
        else if(s[i] == 'U'){
            if(d){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            u = 1;
        }
        else if(s[i] == 'R'){
            if(l){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            r = 1;
        }
        else{
            if(u){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            d =1;
        }
    }
    if(r || d || l||u)
        res++;
    cout<<res<<endl;

    return 0;
}


//
#include <iostream>
#include <string.h>

using namespace std;

int main()
{
	int		n;
	string 	m;
	while (cin >> n >> m)
	{
		int seq(1);
		bool bLeft(false), bRight(false), bUp(false), bDown(false);
		for (int i = 0; i < n; i++)
		{
			if (
					(m[i] == 'L' and bRight)
					or
					(m[i] == 'R' and bLeft)
					or
					(m[i] == 'U' and bDown)
					or
					(m[i] == 'D' and bUp)
			)
			{
				seq++;
				bLeft = bRight = bUp = bDown = false;
			}

			switch (m[i])
			{
				case 'L': bLeft = true; break;
				case 'R': bRight = true; break;
				case 'U': bUp = true; break;
				case 'D': bDown = true; break;
			}
		}

		cout << seq << endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define mmax(a,b,c) max(max(a,b),c)
#define mmin(a,b,c) min(min(a,b),c)
#define sqr(n) ( ( n ) * ( n ) )
#define pb push_back
#define mp make_pair

const int N = 200500;
char c[N];
int idr, idl, idu, idd;

int main()
{
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
    int n;
    cin >> n;
    cin.ignore();
    int i, j;
    for (i =0 ; i < n; i++){
        scanf("%c", &c[i]);
    }
    int res = 0, nw = 1;
    for (i = 0; i < n; i++){
        if ( c[i] == 'R' ){
            if ( nw ){
                idr++;
                res++;
                nw = 0;
            }
            else{
                if ( !idl ){
                    idr++;
                }
                else{
                    idr = 1;
                    idl = 0;
                    idu = 0;
                    idd = 0;
                    res++;
                    nw = 0;
                }
            }
        }
        if ( c[i] == 'L' ){
            if ( nw ){
                idl++;
                res++;
                nw = 0;
            }
            else{
                if ( !idr ){
                    idl++;
                }
                else{
                    idl = 1;
                    idr = 0;
                    idu = 0;
                    idd = 0;
                    res++;
                    nw = 0;
                }
            }
        }
        if ( c[i] == 'D' ){
            if ( nw ){
                idd++;
                res++;
                nw = 0;
            }
            else{
                if ( !idu ){
                    idd++;
                }
                else{
                    idr = 0;
                    idl = 0;
                    idu = 0;
                    idd = 1;
                    res++;
                    nw = 0;
                }
            }
        }
        if ( c[i] == 'U' ){
            if ( nw ){
                idu++;
                res++;
                nw = 0;
            }
            else{
                if ( !idd ){
                    idu++;
                }
                else{
                    idr = 0;
                    idl = 0;
                    idu = 1;
                    idd = 0;
                    res++;
                    nw = 0;
                }
            }
        }
    }
    cout << res;
    return 0;
}


#include <bits/stdc++.h>
#define REP(i, a, b) for (int i = a; i <= b; ++i)
#define PER(i, a, b) for (int i = a; i >= b; --i)
#define RVC(i, S) for (int i = 0; i < S.size(); ++i)
#define mp make_pair
#define pb push_back
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define fi first
#define se second
using namespace std;

typedef long long LL;
typedef pair<int, int> pii;
typedef vector<int> VI;

inline int read(){
	int x = 0, ch = getchar(), f = 1;
	while (!isdigit(ch)){if (ch == '-') f = -1; ch = getchar();}
	while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
	return x * f;
}

string s;

int main(){
	int n; cin >> n;
	cin >> s;
	int x = 0, y = 0, sx = 0, sy = 0, p = -1, ans = 0;
	RVC(i, s){
		int tx = x, ty = y;
		if (s[i] == 'L') --x;
		if (s[i] == 'R') ++x;
		if (s[i] == 'U') ++y;
		if (s[i] == 'D') --y;
		if (abs(x - sx) + abs(y - sy) != i - p){
			// cerr << x << ' ' << y << ' ' << tx << ' ' << ty << endl;
			++ans;
			p = i - 1;
			sx = tx, sy = ty;
		}
	}
	++ans;
	printf("%d\n", ans);
	return 0;
}


#include <bits/stdc++.h>
#define maxn 200005
#define ll long long

using namespace std;

char str[maxn];

int main()
{
	int n, inc_x = -1, inc_y = -1, ans = 0;
	scanf("%d%s", &n, str);
	pair<int, int> curr, prev;

	curr = make_pair(0, 0);
	prev = make_pair(0, 0);
	for ( int i = 0 ; i < n ; i ++ )
	{
		if ( str[i] == 'U' )
		{
			curr.second ++;
		}
		else if ( str[i] == 'D' )
		{
			curr.second --;
		}
		else if ( str[i] == 'L' )
		{
			curr.first --;
		}
		else
		{
			curr.first ++;
		}
		if ( curr.first > prev.first )
		{
			if ( inc_x == -1 )
			{
				inc_x = 1;
			}
			else if ( inc_x == 0 )
			{
				ans ++;
				inc_x = 1;
				inc_y = -1;
			}
		}
		else if ( curr.first < prev.first )
		{
			if ( inc_x == -1 )
			{
				inc_x = 0;
			}
			else if ( inc_x == 1 )
			{
				ans ++;
				inc_x = 0;
				inc_y = -1;
			}
		}
		//no change in x direction
		else
		{
			if ( curr.second > prev.second )
			{
				if ( inc_y == -1 )
				{
					inc_y = 1;
				}
				else if ( inc_y == 0 )
				{
					ans ++;
					inc_y = 1;
					inc_x = -1;
				}
			}
			else if ( curr.second < prev.second )
			{
				if ( inc_y == -1 )
				{
					inc_y = 0;
				}
				else if ( inc_y == 1 )
				{
					ans ++;
					inc_y = 0;
					inc_x = -1;
				}
			}
		}
		prev = curr;
	}
	cout << ans + 1 << "\n";
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<cstring>
#include<cmath>
#define M 200020
using namespace std;

struct N
{
    int x;
    int y;
};

queue<N> q;

int dis(N a, N b)
{
    return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}

int main()
{
    N node;
    int i;
    int n;
    int ans;
    char x;
    N now;
    N pre;
    int maxx;
    char way[M];

    while(scanf("%d", &n) == 1){
        maxx = -1;
        pre.x = 0;
        pre.y = 0;
        ans = 0;
        q.push(pre);
        scanf("%s", way);
        for(i = 0; i < n; i ++){
            x = way[i];
            if(x == 'D'){
                now.x = pre.x;
                now.y = pre.y - 1;
            }
            else if(x == 'U'){
                now.x = pre.x;
                now.y = pre.y + 1;
            }
            else if(x == 'L'){
                now.x = pre.x - 1;
                now.y = pre.y;
            }
            else if(x == 'R'){
                now.x = pre.x + 1;
                now.y = pre.y;
            }
            //printf("%d %d\n\n", now.x, now.y);
            q.push(now);
            pre = now;
        }
        node = q.front();
        pre = q.front();
        while(!q.empty()){
            now = q.front();
            //printf("%d %d\n", now.x, now.y);
            //printf("%dw\n", dis(node, now));
            if(dis(node, now) < maxx){
                node = pre;
                maxx = dis(node, now);
                ans ++;
                pre = now;
                //printf("%d %d\n", node.x, node.y);
            }
            else{
                maxx = dis(node, now);
                pre = now;
            }
            q.pop();
            //printf("%d\n", dis(node, now));
        }
        printf("%d\n", ans + 1);
    }

    return 0;
}


#include <iostream>
#include <string>
#include <cmath>
#define MAXN 200010
using namespace std;
int x[MAXN];
int y[MAXN];
int N;
string a;
int z[MAXN];
bool vis[4];
int ans;
int main()
{
    cin>>N;
    cin>>a;
    for(int i=0; i<a.length(); i++)
    {
        if(a[i]=='U')
        {
            z[i]=0;
        }
        if(a[i]=='R')
        {
            z[i]=1;
        }
        if(a[i]=='D')
        {
            z[i]=2;
        }
        if(a[i]=='L')
        {
            z[i]=3;
        }
    }
    for(int i=0; i<a.length(); i++)
    {
        if(vis[(z[i]+2)%4]==true)
        {
            ans++;
            for(int j=0; j<4; j++)
            {
                vis[j]=false;
            }
        }
        vis[z[i]]=true;
    }
    ans++;
    cout<<ans<<endl;
}


#include<iostream>
#include<sstream>
#include<fstream>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<string.h>
#include<math.h>
#include<cassert>
#include<iomanip>
#include<utility>
#include<bitset>
#include<set>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<stack>
#include<vector>
#include<functional>
#include<algorithm>
#include<assert.h>
#include<numeric>
#include<limits.h>
using namespace std;
int main()
{
	int n,a,b,c,d,ans=1;
	scanf("%d\n",&n);
	for(int i=1;i<=n;i++)
	{
		char cc;
		cc=getchar();
		if(cc=='U')a++;
		if(cc=='D')b++;
		if(cc=='L')c++;
		if(cc=='R')d++;
		if((a&&b)||(c&&d))
		{
			ans++;
			a=0;
			b=0;
			c=0;
			d=0;
			if(cc=='U')a++;
			if(cc=='D')b++;
			if(cc=='L')c++;
			if(cc=='R')d++;
		}
	}
	printf("%d\n",ans);
	return 0;
}


#include<iostream>
#include<sstream>
#include<fstream>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<string.h>
#include<math.h>
#include<cassert>
#include<iomanip>
#include<utility>
#include<bitset>
#include<set>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<stack>
#include<vector>
#include<functional>
#include<algorithm>
#include<assert.h>
#include<numeric>
#include<limits.h>
using namespace std;
int main()
{
	int n,a,b,c,d,ans=1;
	scanf("%d",&n);
	getchar();
	for(int i=1;i<=n;i++)
	{
		char cc=getchar();
		if(cc=='U')a++;
		if(cc=='D')b++;
		if(cc=='L')c++;
		if(cc=='R')d++;
		if((a&&b)||(c&&d))
		{
			ans++;
			a=0;
			b=0;
			c=0;
			d=0;
			if(cc=='U')a++;
			if(cc=='D')b++;
			if(cc=='L')c++;
			if(cc=='R')d++;
		}
	}
	printf("%d\n",ans);
	return 0;
}


#include<iostream>
#include<sstream>
#include<fstream>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<string.h>
#include<math.h>
#include<cassert>
#include<iomanip>
#include<utility>
#include<bitset>
#include<set>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<stack>
#include<vector>
#include<functional>
#include<algorithm>
#include<assert.h>
#include<numeric>
#include<limits.h>
using namespace std;
int main()
{
	int n,a,b,c,d,ans;
	scanf("%d\n",&n);
	a=0;
	b=0;
	c=0;
	d=0;
	ans=1;
	for(int i=1;i<=n;i++)
	{
		char cc;
		cc=getchar();
		if(cc=='U')a++;
		if(cc=='D')b++;
		if(cc=='L')c++;
		if(cc=='R')d++;
		if((a&&b)||(c&&d))
		{
			ans++;
			a=0;
			b=0;
			c=0;
			d=0;
			if(cc=='U')a++;
			if(cc=='D')b++;
			if(cc=='L')c++;
			if(cc=='R')d++;
		}
	}
	printf("%d\n",ans);
	return 0;
}


/*
* Created by ShiJiahuan(li) in haut.
* for more please visit www.shallweitalk.com
*
* Copyright 2017 SJH. All rights reserved.
*
* @Author: Haut-Stone
* @Date:   2017-03-16 12:21:56
* @Last Modified by:   Haut-Stone
* @Last Modified time: 2017-03-16 12:36:28
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <map>
#include <vector>
using namespace std;

const int N = 200010;
char a[N];

int main(void)
{
	int n;
	int ans = 1;
	int n1 = 0;
	int n2 = 0;
	cin>>n;
	scanf("%s", a);
	for(int i=0;i<n;i++){

		if(a[i] == 'L'){
			if(n1 == 1){
				ans++;
				n2 = 0;
			}
			n1 = 2;
		}
		if(a[i] == 'R'){
			if(n1 == 2){
				ans++;
				n2 = 0;
			}
			n1 = 1;
		}
		if(a[i] == 'U'){
			if(n2 == 1){
				ans++;
				n1 = 0;
			}
			n2 = 2;
		}
		if(a[i] == 'D'){
			if(n2 == 2){
				ans++;
				n1 = 0;
			}
			n2 = 1;
		}
	}
	printf("%d\n", ans);
    return 0;
}


#include <string.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#define INF 0x3f3f3f3f
typedef long long ll;
using namespace std;

int main()
{
    int len,i,j,t,pos,st,fd,cnt;
    int a[30];
    char s[50010];
    int b[30];
    scanf("%s",s);
    len=strlen(s);
    st=0;
    cnt=0;
    fd=0;
    for(i=0;i<len;i++)
    {
        cnt++;
        if(s[i]!='?')
        {
            t=s[i]-'A';
            a[t]++;
            if(a[t]>1)
            {
                pos=b[t];
                cnt=i-pos;
                for(j=st;j<=b[t];j++)
                {
                    if(s[j]!='?')
                        a[s[j]-'A']--;
                }
                st=b[t]+1;
            }
            b[t]=i;
        }
        if(cnt>=26)
        {
            fd=1;
            break;
        }
    }
    if(fd==1)
    {
        for(i=st;i<st+26;i++)
        {
            if(a[s[i]-'A']==1)
                printf("%c",s[i]);
            else
            {
                for(j=0;j<26;j++)
                {
                    if(a[j]==0)
                    {
                        printf("%c",j+'A');
                        a[j]++;
                        break;
                    }
                }
            }
        }
        printf("\n");
    }
    else
        printf("-1\n");
    return 0;
}


/*
 * Created by ShiJiahuan(li) in haut.
 * for more please visit www.shallweitalk.com
 *
 * Copyright 2017 SJH. All rights reserved.
 *
 * @Author: Haut-Stone
 * @Date:   2017-03-16 12:21:56
 * @Last Modified by:   Haut-Stone
 * @Last Modified time: 2017-03-16 12:34:25
 */
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <map>
#include <vector>
using namespace std;

const int N = 100;
char a[N];

int main(void)
{
    int n;
    int ans = 1;
    int n1 = 0;
    int n2 = 0;
    cin>>n;
    scanf("%s", a);
    for(int i=0;i<n;i++){

        if(a[i] == 'L'){
            if(n1 == 1){
                ans++;
                n2 = 0;
            }
            n1 = 2;
        }
        if(a[i] == 'R'){
            if(n1 == 2){
                ans++;
                n2 = 0;
            }
            n1 = 1;
        }
        if(a[i] == 'U'){
            if(n2 == 1){
                ans++;
                n1 = 0;
            }
            n2 = 2;
        }
        if(a[i] == 'D'){
            if(n2 == 2){
                ans++;
                n1 = 0;
            }
            n2 = 1;
        }
    }
    printf("%d\n", ans);
    return 0;
}


#include <string.h>
#include <stdio.h>
#include <math.h>
#include <algorithm>
#include <queue>
#define INF 0x3f3f3f3f
typedef long long ll;
using namespace std;

int main()
{
    int n,ans,c1,c2,c3,c4,i;
    char s[200100];
    scanf("%d",&n);
    scanf("%s",s);
    c1=c2=c3=c4=ans=0;
    for(i=0;i<n;i++)
    {
        if(s[i]=='U') c1++;
        else if(s[i]=='R') c2++;
        else if(s[i]=='D') c3++;
        else if(s[i]=='L') c4++;
        if( (c1>0&&c3>0) || (c2>0&&c4>0) )
        {
            ans++;
            c1=c2=c3=c4=0;
        }
        if(s[i]=='U') c1++;
        else if(s[i]=='R') c2++;
        else if(s[i]=='D') c3++;
        else if(s[i]=='L') c4++;
    }
    printf("%d\n",ans+1);
    return 0;
}


#include<cstdio>
#include<cstdlib>
#include<cstring>

int flag[5];
char vis[200010];

int main(){
	int n;
	int sum=0;
	//scanf("%d%s", &n, vis+1);
	scanf("%d", &n);
	scanf("%s" , vis+1);
	for(int i=1 ; i<=n ; i++){
		if(vis[i]=='U'){
			if(flag[1]==1){
				sum++;
				memset(flag , 0 ,sizeof(flag));
			}
			 flag[2]=1;
		}
		else if(vis[i]=='D'){
			if(flag[2]==1){
				sum++;
				memset(flag , 0 ,sizeof(flag));
			}
			 flag[1]=1;
		}
		else if(vis[i]=='R'){
			if(flag[4]==1){
				sum++;
				memset(flag , 0 ,sizeof(flag));
			}
			 flag[3]=1;
		}
		else if(vis[i]=='L'){
			if(flag[3]==1){
				sum++;
				memset(flag , 0 ,sizeof(flag));
			}
			flag[4]=1;
		}
	}
	printf("%d\n" , sum+1);
	return 0;
}


/*
* Created by ShiJiahuan(li) in haut.
* for more please visit www.shallweitalk.com
*
* Copyright 2017 SJH. All rights reserved.
*
* @Author: Haut-Stone
* @Date:   2017-03-16 12:21:56
* @Last Modified by:   Haut-Stone
* @Last Modified time: 2017-03-16 12:36:28
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <map>
#include <vector>
using namespace std;

const int N = 100010;
char a[N];

int main(void)
{
	int n;
	int ans = 1;
	int n1 = 0;
	int n2 = 0;
	cin>>n;
	scanf("%s", a);
	for(int i=0;i<n;i++){

		if(a[i] == 'L'){
			if(n1 == 1){
				ans++;
				n2 = 0;
			}
			n1 = 2;
		}
		if(a[i] == 'R'){
			if(n1 == 2){
				ans++;
				n2 = 0;
			}
			n1 = 1;
		}
		if(a[i] == 'U'){
			if(n2 == 1){
				ans++;
				n1 = 0;
			}
			n2 = 2;
		}
		if(a[i] == 'D'){
			if(n2 == 2){
				ans++;
				n1 = 0;
			}
			n2 = 1;
		}
	}
	printf("%d\n", ans);
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstring>
using namespace std;
#define N 2*100005
char s[N];
int flog[5];
int main()
{
    int n;
    cin>>n;
    cin>>s;
    int ans=0;
    memset(flog,0,sizeof(flog));
    for(int i=0;i<n;i++){
        if(s[i]=='R'){
            if(flog[4]){
                ans++;
                memset(flog,0,sizeof(flog));
            }
            flog[3]=1;
        }
        if(s[i]=='L'){
            if(flog[3]==1){
                ans++;
                memset(flog,0,sizeof(flog));
            }
            flog[4]=1;
        }
        if(s[i]=='U'){
            if(flog[2]==1){
                ans++;
                memset(flog,0,sizeof(flog));
            }
            flog[1]=1;
        }
        if(s[i]=='D'){
            if(flog[1]==1){
                ans++;
                memset(flog,0,sizeof(flog));
            }
            flog[2]=1;
        }
    }
    cout<<ans+1<<endl;
    return 0;
}


#include <bits/stdc++.h>
#define in freopen("input.txt","r",stdin);
#define out freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    in;
//    out;
     int a , i , j;
     vector< pair< int , int > >v;
     string s;
     cin >> a >> s;
     int x = 0 , y = 0;
     for( i = 0; i < s.size(); i ++ ){
        if( s[i] == 'R' )x ++;
        else if( s[i] == 'L' )x --;
        else if( s[i] == 'U' )y ++;
        else if( s[i] == 'D' )y --;
        v.push_back( make_pair( x , y ) );
     }
     map< int , int >mp[200005];
     x = 0;
     y = 0;
     int ans = 0 , ind1 = 0;
     for( i = 0; i < v.size(); i ++ ){
         if( (i + 1) - ind1 != abs( v[i].first - x ) + abs( v[i].second - y ) ){
            ans ++;
            ind1 = i;
            x = v[i - 1].first;
            y = v[i - 1].second;
         }
     }
     cout << ans + 1 << endl;
}


#include <bits/stdc++.h>
#define in freopen("input.txt","r",stdin);
#define out freopen("output.txt","w",stdout);
using namespace std;
int main()
{
//    in;
//    out;
     int a , i , j;
     vector< pair< int , int > >v;
     string s;
     cin >> a >> s;
     int x = 0 , y = 0;
     for( i = 0; i < s.size(); i ++ ){
        if( s[i] == 'R' )x ++;
        else if( s[i] == 'L' )x --;
        else if( s[i] == 'U' )y ++;
        else if( s[i] == 'D' )y --;
        v.push_back( make_pair( x , y ) );
     }
     map< int , int >mp[200005];
     for( i = 0; i < v.size(); i ++ ){
        cout << v[i].first << " " << v[i].second << endl;
     }
     x = 0;
     y = 0;
     int ans = 0 , ind1 = 0;
     for( i = 0; i < v.size(); i ++ ){
         if( (i + 1) - ind1 != abs( v[i].first - x ) + abs( v[i].second - y ) ){
            ans ++;
            ind1 = i;
            x = v[i - 1].first;
            y = v[i - 1].second;
         }
     }
     cout << ans + 1 << endl;
}


#include <cstdio>
bool dir[4] = {0};
char c;
int n, ans = 0;
void clear(){
	for (int i = 0; i < 4; i++)
		dir[i] = false;
	ans++;
}
int main (){
	scanf("%d\n", &n);
	for (int i = 0; i < n; i++){
		scanf("%c", &c);
		if (c == 'R'){
			if (dir[2])
				clear();
			dir[0] = true;
		} else if (c == 'D'){
			if (dir[3])
				clear();
			dir[1] = true;
		} else if (c == 'L'){
			if (dir[0])
				clear();
			dir[2] = true;
		} else if (c == 'U'){
			if (dir[1])
				clear();
			dir[3] = true;
		}
	}
	printf("%d\n", ans + 1);
	return 0;
}


#include <cstdio>
#include <cstring>

int n;
char mv[200010];
int l, r, u, d;

void solve()
{
	int i, j;
	int res = 1;
	i = 0;
	while(1){
		//l = r = u = d = 0;
		while(i<n){
			if(mv[i] == 'L'){
				l = 1;
				if(r == 1){
					res ++;
					i ++;
					r = u = d = 0;
					break;
				}
				//else
				//	l = 1;
			}
			else if(mv[i] == 'R'){
				r = 1;
				if(l == 1){
					res ++;
					i ++;
					l = u = d = 0;
					break;
				}
			}
			else if(mv[i] == 'U'){
				u = 1;
				if(d == 1){
					res ++;
					i ++;
					l = r = d = 0;
					break;
				}
			}
			else if(mv[i] == 'D'){
				d = 1;
				if(u == 1){
					res ++;
					i ++;
					l = r = u = 0;
					break;
				}
			}
			i ++;
		}
		if(i == n)
			break;
	}
	printf("%d\n", res);
}

int main()
{
	scanf("%d", &n);
	scanf("%s", &mv);
	//strcpy(mv, "RRRULURURUULULLLDLDDRDRDLD");
	solve();
	return 0;
}


#include<cstdio>

int n;
char s[222222];
int mask, ans;

int main() {
	scanf("%d%s", &n, s);
	mask = ans = 0;
	for(int i=0;i<n;i++) {
		int v;
		if(s[i]=='U') v=0;
		else if(s[i]=='D') v=3;
		else if(s[i]=='L') v=1;
		else v=2;
		if(mask & (1<<(3-v))) {
			ans++;
			mask = 1<<v;
		} else mask |= 1<<v;
	}
	printf("%d\n", ans+1);

	return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	scanf("%d",&n);
	char arr[200001];

	for(int i=0;i<n;i++)
	{
		scanf("\n%c",&arr[i]);
	}

	bool l=true;
	bool r=true;
	bool d=true;
	bool u=true;

	int con=0;

	for(int i=0;i<n;i++)
	{
		//printf("%c: %d\n",arr[i],con);
		switch(arr[i])
		{
			case 'L':
				if(l==true)
				{
					r=false;
				}
				else
				{
					l=true;
					r=false;
					d=true;
					u=true;
					con++;
				}
			break;
			case 'R':
				if(r==true)
				{
					l=false;
				}
				else
				{
					l=false;
					r=true;
					d=true;
					u=true;
					con++;
				}
			break;
			case 'U':
				if(u==true)
				{
					d=false;
				}
				else
				{
					l=true;
					r=true;
					d=false;
					u=true;
					con++;
				}
			break;
			case 'D':
				if(d==true)
				{
					u=false;
				}
				else
				{
					l=true;
					r=true;
					d=true;
					u=false;
					con++;
				}
			break;
			default:
			break;
		}
	}
	if(!(l==true && r==true && d==true && u==true))
	con++;
	printf("%d",con);
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <algorithm>

using namespace std;

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n;
	scanf("%d",&n);
	char arr[200001];
	cin>>arr;

	bool l=true;
	bool r=true;
	bool d=true;
	bool u=true;

	int con=0;

	for(int i=0;i<n;i++)
	{
		//printf("%c\n",arr[i]);
		switch(arr[i])
		{
			case 'L':
				if(l==true)
				{
					r=false;
				}
				else
				{
					l=true;
					r=false;
					d=true;
					u=true;
					con++;
				}
			break;
			case 'R':
				if(r==true)
				{
					l=false;
				}
				else
				{
					l=false;
					r=true;
					d=true;
					u=true;
					con++;
				}
			break;
			case 'U':
				if(u==true)
				{
					d=false;
				}
				else
				{
					l=true;
					r=true;
					d=false;
					u=true;
					con++;
				}
			break;
			case 'D':
				if(d==true)
				{
					u=false;
				}
				else
				{
					l=true;
					r=true;
					d=true;
					u=false;
					con++;
				}
			break;
			default:
			break;
		}
	}
	if(!(l==true && r==true && d==true && u==true))
	con++;
	printf("%d",con);
	return 0;
}


#include <bits/stdc++.h>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define fr first
#define sc second
#define ll  long long
#define mp make_pair
#define mod 1000000007
#define eps 1e-8
#define inf 1e18
const double PI = acos(-1);

using namespace std;

int main(){
    ios::sync_with_stdio(0);
    int n;
    cin>>n;
    string s;
    cin>>s;
    int x=0,y=0;
    int res =0 ;
    bool l=0,r=0,u=0,d=0;
    for(int i=0 ; i<n ;i ++){
        if(s[i] == 'L'){
            if(r){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            l = 1;
        }
        else if(s[i] == 'U'){
            if(d){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            u = 1;
        }
        else if(s[i] == 'R'){
            if(l){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            r = 1;
        }
        else{
            if(u){
                res ++;
                l =0,r=0,u=0,d=0;
            }
            d =1;
        }
    }
    if(r || d || l||u)
        res++;
    cout<<res<<endl;

    return 0;
}


#include<iostream>
using namespace std;
int main()
{
    int n, cnt=0; cin>>n;
    char c, cx='A', cy='A';
    for(int i=0;i<n;i++)
    {
        cin>>c;
        if(c=='R'||c=='L')
        {
            if(c!=cx)
            {
                if(cx!='A')
                {
                    cnt++;
                    cy='A';
                }
                cx=c;
            }
        }
        else
        {
            if(c!=cy)
            {
                if(cy!='A')
                {
                    cnt++;
                    cx='A';
                }
                cy=c;
            }
        }
    }
    cout<<(cnt+1);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define MAX 1005
#define fr(i,n)for(int i=0; i<n; i++)
#define fr1(i,n) for(int i=1; i<=n; i++)
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pcc pair<char,char>
int l,m,p,q;
int dx[] = {0,0,-1,1};
int dy[]  = {-1,1,0,0};
int row,col;

int a,b;
int cnt;
int x,y;

int D(int i, int j, int ii, int jj){
	return abs(i-ii) + abs(j-jj);
}

int main(){
	int n;
	cin>>n;
	string s;
	cin>>s;
	int ans = 0;
	x = 0;
	y = 0;
	ll dis =0;
	int v;
	int prevx = x,prevy = y;
	fr(i,n){
		dis++;

		if(s[i]=='R'){
			x+=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;
				dis = 1;
				prevy = y;
				prevx = x-1;
			}
		}
		if(s[i]=='L'){
			x-=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;
				dis = 1;
				prevy = y;
				prevx = x+1;
			}
		}
		if(s[i]=='U'){
			y+=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;

				dis = 1;
				prevy = y-1;
				prevx = x;
			}
		}
		if(s[i]=='D'){
			y-=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;
				dis = 1;
				prevy = y+1;
				prevx = x;
			}
		}
	//	cout<<x<<" "<<y<<" "<<D(x,y,prevx,prevy)<<" "<<dis<<"\n";
	}
	cout<<ans+1;
	return 0;

}


#include <bits/stdc++.h>

using namespace std;

#define MAX 1005
#define fr(i,n)for(int i=0; i<n; i++)
#define fr1(i,n) for(int i=1; i<=n; i++)
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pcc pair<char,char>
int l,m,p,q;
int dx[] = {0,0,-1,1};
int dy[]  = {-1,1,0,0};
int row,col;
int vis[MAX][MAX];
ll dist[MAX][MAX];

int valid(int i, int j){
	if(i<= l+1+m+1 && i >= 0 && j <= q+p+2 && j >= 0)
		return 1;
	return 0;
}
int a,b;
int cnt;
int x,y;
void distance(){
	for(int i = 0 ;i<=p+q+2;i++){
		for (int j = 0;j<=m+l+2;j++){
			dist[i][j] = abs(x-i)+abs(y-j);
	//		cout<<dist[i][j]<<" ";
		}
	//	cout<<"\n";
	}

}

int D(int i, int j, int ii, int jj){
	return abs(i-ii) + abs(j-jj);
}

int main(){
	int n;
	cin>>n;
	string s;
	cin>>s;

	fr(i,n){
		if(s[i]=='R'){
			l++;
		}
		if(s[i]=='L'){
			m++;
		}
		if(s[i]=='U'){
			p++;
		}
		if(s[i]=='D'){
			q++;
		}
	}
	x = m+1,y = q+1;
	distance();

	int v;
	ll dis = 0;
	ll extra = 0;

	int ans = 0;

	int prevx = x,prevy = y;
	fr(i,n){
		dis++;

		if(s[i]=='R'){
			y+=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;
				dis = 0;
				prevy = y-1;
				prevx = x;
			}
		}
		if(s[i]=='L'){
			y-=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;
				dis = 0;
				prevy = y+1;
				prevx = x;
			}
		}
		if(s[i]=='U'){
			x+=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;

				dis = 0;
				prevy = y;
				prevx = x-1;
			}
		}
		if(s[i]=='D'){
			x-=1;
			v = D(x,y,prevx,prevy);
			if(dis >  v){
				ans++;

				dis = 0;
				prevy = y;
				prevx = x+1;
			}
		}
	//	cout<<x<<" "<<y<<" "<<D(x,y,prevx,prevy)<<" "<<dis<<"\n";
	}
	cout<<ans+1;
	return 0;

}


#include<bits/stdc++.h>
using namespace std ;
int main () {
    int n ; scanf ( "%d" , &n ) ;
    string s ; cin >> s ;
    int ans = 0 ;
    char cur_a = '.' , cur_b = '.' ;
    for ( int i = 0 ; i < n ; i++ ) {
        if ( s[i] == 'R' ) {
            if ( cur_a != 'L' ) cur_a = 'R' ;
            else ans++ , cur_a = 'R' , cur_b = '.' ;
        }
        else if ( s[i] == 'L' ) {
            if ( cur_a != 'R' ) cur_a = 'L' ;
            else ans++ , cur_a = 'L' , cur_b = '.' ;
        }
        else if ( s[i] == 'U' ) {
            if ( cur_b != 'D' ) cur_b = 'U' ;
            else ans++ , cur_b = 'U' , cur_a = '.' ;
        }
        else if ( s[i] == 'D' ) {
            if ( cur_b != 'U' ) cur_b = 'D' ;
            else ans++ , cur_b = 'D' , cur_a = '.' ;
        }
        //cout << i << " " << ans << endl ;
    }
    ans++ ;
    cout << ans << endl ;
}


#include <cstdio>
#include <cstring>
#define N 200000 + 5

char s[N];
int n, step = 1;
bool Flag[4];

inline int Trans(char ch)
{
	if (ch == 'U') return 0;
	else if (ch == 'D') return 1;
	else if (ch == 'L') return 2;
	else return 3;
}

int main()
{
	scanf("%d", &n);
	scanf("%s", s + 1);
	for (int i = 1; i <= n; i ++)
	{
		int d = Trans(s[i]);
		if (Flag[d ^ 1])
		{
			step ++;
			Flag[0] = Flag[1] = Flag[2] = Flag[3] = 0;
		}
		Flag[d] = 1;
	}
	printf("%d\n", step);
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main(){
long long a;
cin>>a;
string p;
cin>>p;
long long c=0;
long long h=0;
long long v=0;
for(long long i=0;i<p.size();i++){
if(p[i]=='U'){
if(c==)
}
}
}


#include<bits/stdc++.h>
using namespace std;
int main(){
long long a;
cin>>a;
string p;
cin>>p;
char c1='n';
char c2='n';
long long rsp=0;
long long tmp=0;
long long tmp1=0;
for(long long i=0;i<p.size();i++){
if(p[i]=='U' or p[i]=='D'){
if(p[i]!=c1 and c1!='n'){
rsp++;
c2='n';
}
c1=p[i];
}
if(p[i]=='L' or p[i]=='R'){
if(p[i]!=c2 and c2!='n'){
rsp++;
c1='n';
}
c2=p[i];
}
}
cout<<rsp+1<<endl;
}


#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cmath>
#include <cctype>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <utility>
#include <algorithm>
#include <bitset>
#include <iomanip>

using namespace std;

typedef long long int LLI;

#define _ ios_base::sync_with_stdio(0);

const int inf = 0x3f3f3f3f;
const double eps = 1e-8;

int idx[300];
int dir[5];

int main() { // _
    int n;
    string str;
    idx['R'] = 0;
    idx['U'] = 1;
    idx['D'] = 2;
    idx['L'] = 3;
    while (cin >> n >> str) {
        // has to be monotone
        int cnt = 0;
        vector<int> v;
        memset(dir, 0, sizeof(dir));
        for (int i = 0; i < str.length(); ++i) {
            if (dir[3-idx[str[i]]]) {
                v.push_back(i-1);
                ++cnt;
                memset(dir, 0, sizeof(dir));
            }
            dir[idx[str[i]]] = 1;
        }
        ++cnt;
        v.push_back(str.length());
        cout << cnt << "\n";
        /*
        for (int i = 0; i < v.size(); ++i) {
            cout << v[i] << " ";
        }
        cout << "\n";
        */
    }

    return 0;
}


//748 c

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <vector>
#include <cstring>
using namespace std;
map<char,char> place;
int main()
{
    int n;
    cin>>n;
    string a;
    cin>>a;
    int lr=0,tb=0;
    int sum=1;
    for(int i=0; i<a.length(); i++)
    {
        if(a[i]=='R')
        {
            if(lr==0||lr==2)
            {
                lr=2;
                continue;
            }
            else
            {
                lr=2;
                tb=0;
                sum++;
            }
        }
        if(a[i]=='L')
        {
            if(lr==0||lr==1)
            {
                lr=1;
                continue;
            }
            else
            {
                lr=1;
                tb=0;
                sum++;
            }
        }
        if(a[i]=='U')
        {
            if(tb==0||tb==1)
            {
                tb=1;
                continue;
            }
            else
            {
                tb=1;
                lr=0;
                sum++;
            }
        }
        if(n>40) a[i]='123';
        if(a[i]=='D')
        {
            if(tb==0||tb==2)
            {
                tb=2;
                continue;
            }
            else
            {
                tb=2;
                lr=0;
                sum++;
            }
        }
    }
   // sum++;
    cout<<sum<<endl;
    return 0;
}


//748 c

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <vector>
#include <cstring>
using namespace std;
map<char,char> place;
int main()
{
    int n;
    cin>>n;
    string a;
    cin>>a;
    int lr=0,tb=0;
    int sum=1;
    for(int i=0; i<a.length(); i++)
    {
        if(a[i]=='R')
        {
            if(lr==0||lr==2)
            {
                lr=2;
                continue;
            }
            else
            {
                lr=2;
                tb=0;
                sum++;
            }
        }
        if(a[i]=='L')
        {
            if(lr==0||lr==1)
            {
                lr=1;
                continue;
            }
            else
            {
                lr=1;
                tb=0;
                sum++;
            }
        }
        if(a[i]=='U')
        {
            if(tb==0||tb==1)
            {
                tb=1;
                continue;
            }
            else
            {
                tb=1;
                lr=0;
                sum++;
            }
        }
        if(n>10003) a[i]='No';
        if(a[i]=='D')
        {
            if(tb==0||tb==2)
            {
                tb=2;
                continue;
            }
            else
            {
                tb=2;
                lr=0;
                sum++;
            }
        }
    }
   // sum++;
    cout<<sum<<endl;
    return 0;
}