#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 5;
int a[MAXN];
int main() {
  int t;
  int n;
  cin >> t;
  while (t--) {
    cin >> n;
    bool f = 0;
    int l, r;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (i > 1 && (abs(a[i] - a[i - 1]) > 1)) {
        f = 1;
        l = i - 1;
        r = i;
      }
    }
    cout << (f ? "YES" : "NO") << endl;
    if (f) cout << l << " " << r << endl;
  }
  return 0;
}
