#include <bits/stdc++.h>
const double PI = acos(-1);
using namespace std;
using ll = long long;
using ld = long double;
int n;
const int maxn = 2e5 + 10;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  for (int t = 0; t < T; t++) {
    cin >> n;
    int l = -1;
    int r = -1;
    int prev;
    cin >> prev;
    for (int i = 1; i <= n - 1; i++) {
      int a;
      cin >> a;
      if (abs(a - prev) > 1) {
        l = i;
        r = i + 1;
      }
      prev = a;
    }
    if (l != -1) {
      cout << "YES" << endl;
      cout << l << " " << r << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
