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