#include <bits/stdc++.h>
using namespace std;
int t, n;
bool flag = 0;
int x, y;
long long a[200500];
int main() {
  cin >> t;
  for (int testnum = 1; testnum <= t; testnum++) {
    cin >> n;
    flag = 0;
    cin >> a[1];
    for (int i = 2; i <= n; i++) {
      cin >> a[i];
      if (abs(a[i] - a[i - 1]) > 1 && !flag) {
        flag = 1;
        x = i - 1;
        y = i;
      }
    }
    if (flag)
      cout << "YES\n" << x << " " << y << '\n';
    else
      cout << "NO\n";
  }
  return 0;
}
