#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    long long n, i, j;
    cin >> n;
    long long a[n + 1];
    for (i = 0; i < n; i++) cin >> a[i];
    long long mx = a[0], l = 1, r = -1, f = 0;
    for (i = 1; i < n; i++) {
      mx--;
      if (a[i] < mx) {
        r = i + 1;
        f = 1;
        break;
      }
      if (a[i] > mx) {
        l = i + 1;
        mx = a[i];
      }
    }
    if (!f) {
      long long mn = a[0];
      l = 1, r = -1;
      for (i = 1; i < n; i++) {
        mn++;
        if (a[i] > mn) {
          r = i + 1;
          f = 1;
          break;
        }
        if (a[i] < mn) {
          l = i + 1;
          mn = a[i];
        }
      }
      if (f) {
        cout << "YES\n";
        cout << l << " " << r << "\n";
      } else
        cout << "NO"
             << "\n";
    } else if (f) {
      cout << "YES\n";
      cout << l << " " << r << "\n";
    }
  }
  return 0;
}
