#include <bits/stdc++.h>
using namespace std;
double low = 0, high = 0, mid = 0;
int binary_sear(const vector<int>& v, int x) {
  while (1) {
    mid = floor((low + high) / 2);
    if (low > high) break;
    if (v[mid] == x) {
      return mid;
      break;
    } else if (v[mid] < x) {
      low = mid + 1;
    } else {
      high = mid - 1;
    }
  }
  return -1;
}
int binary(vector<int> v, int x) {
  mid = floor((low + high) / 2);
  cout << low << " " << mid << " " << high << endl;
  if (low > high) return -1;
  if (v[mid] == x)
    return mid;
  else if (v[mid] < x) {
    low = mid + 1;
    return binary(v, x);
  } else {
    high = mid - 1;
    return binary(v, x);
  }
}
int main() {
  int a, b, c, n, m, mx = 0, mn = 0;
  vector<int> v;
  bool flag = true, flag2 = true;
  cin >> n;
  while (n--) {
    cin >> m;
    for (int i = 0; i < m; i++) {
      cin >> a;
      if (i == 0) {
        mn = a;
        continue;
      }
      if (abs(mn - a) > 1 && flag2) {
        cout << "YES" << endl;
        cout << i << " " << i + 1 << endl;
        flag = false;
        flag2 = false;
      }
      mn = a;
    }
    if (flag) cout << "NO" << endl;
    flag = true;
    flag2 = true;
  }
  return 0;
}
