#include <bits/stdc++.h>
inline long long rd() {
  long long _x = 0;
  int _ch = getchar(), _f = 1;
  for (; !isdigit(_ch) && (_ch != '-') && (_ch != EOF); _ch = getchar())
    ;
  if (_ch == '-') {
    _f = 0;
    _ch = getchar();
  }
  for (; isdigit(_ch); _ch = getchar()) _x = _x * 10 + _ch - '0';
  return _f ? _x : -_x;
}
void write(long long _x) {
  if (_x >= 10)
    write(_x / 10), putchar(_x % 10 + '0');
  else
    putchar(_x + '0');
}
inline void wrt(long long _x, char _p) {
  if (_x < 0) putchar('-'), _x = -_x;
  write(_x);
  if (_p) putchar(_p);
}
int T, n;
int a[200005];
int sta1[200005], top1, sta2[200005], top2;
int v1[200005], v2[200005];
int mx1[200005], mx2[200005];
inline int Max(int x, int y, int *v) { return v[x] > v[y] ? x : y; }
int main() {
  T = rd();
  while (T--) {
    n = rd();
    for (int i = 1; i <= n; i++) {
      a[i] = rd();
    }
    v1[0] = v2[0] = -1e9 - 100000;
    top1 = top2 = 0;
    bool flag = 0;
    int ans1, ans2;
    for (int i = 1; i <= n; i++) {
      while (top1 && a[sta1[top1]] >= a[i]) top1--;
      while (top2 && a[sta2[top2]] <= a[i]) top2--;
      sta1[++top1] = i, sta2[++top2] = i;
      v1[top1] = i - a[i], v2[top2] = i + a[i];
      mx1[top1] = Max(mx1[top1 - 1], top1, v1),
      mx2[top2] = Max(mx2[top2 - 1], top2, v2);
      if (v1[mx1[top1]] >= i - a[i] + 1) {
        flag = 1, ans1 = sta1[mx1[top1]], ans2 = i;
      }
      if (v2[mx2[top2]] >= i + a[i] + 1) {
        flag = 1, ans1 = sta2[mx2[top2]], ans2 = i;
      }
    }
    if (flag) {
      printf("YES\n");
      printf("%d %d\n", ans1, ans2);
    } else
      printf("NO\n");
  }
}
