#include <bits/stdc++.h>
using namespace std;
int t;
int n;
long long a[200001];
int main() {
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
    pair<int, int> ans = {-2, -2};
    for (int i = 1; i < n; i++)
      if (abs(a[i] - a[i - 1]) > 1) ans = {i - 1, i};
    if (ans.first == -2)
      cout << "NO\n";
    else
      cout << "YES\n" << ans.first + 1 << " " << ans.second + 1 << "\n";
  }
  return 0;
}
