#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long int test, n, i, flag, r, l;
  cin >> test;
  while (test--) {
    cin >> n;
    long long int arr[n];
    flag = 0;
    cin >> arr[0];
    for (i = 1; i < n; i++) {
      cin >> arr[i];
      if (flag == 0) {
        if (abs(arr[i] - arr[i - 1]) > 1) {
          l = i;
          r = i + 1;
          flag = 1;
        }
      }
    }
    if (flag)
      cout << "YES"
           << "\n"
           << l << " " << r << endl;
    else
      cout << "NO" << endl;
  }
}
