#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 20;
int n, a[MAX];
int main(void) {
  int T;
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    bool allBad = 1;
    int rl = 0, rr = 0;
    scanf("%d", &a[1]);
    for (register int i = (2); i <= (n); ++i) {
      scanf("%d", &a[i]);
      if (abs(a[i] - a[i - 1]) > 1) {
        allBad = 0;
        rl = i - 1, rr = i;
      }
    }
    if (allBad)
      printf("NO\n");
    else
      printf("YES\n%d %d\n", rl, rr);
  }
  return 0;
}
