#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const double EPS = 1e-9;
const double PI = acos(-1.);
const long long LL_INF = 1e17 + 10;
const int INF = 1e9 + 10;
const long long MOD = 1e9 + 7;
const int MAXN = 2e5 + 5;
void solve() {
  int n, fl = 0, l, r, last;
  scanf("%d%d", &n, &last);
  for (int i = (2); i <= (int)(n); i++) {
    int a;
    scanf("%d", &a);
    if (abs(a - last) >= 2) {
      fl = 1, l = i - 1, r = i;
    }
    last = a;
  }
  if (fl) {
    printf("YES\n%d %d\n", l, r);
  } else {
    printf("NO\n");
  }
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
