← Home
```go
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var t int
	fmt.Fscan(reader, &t)

	for ; t > 0; t-- {
		var n int
		fmt.Fscan(reader, &n)

		p := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(reader, &p[i])
		}

		// Array to store the index of the minimum element in the prefix p[0...i]
		prefixMin := make([]int, n)
		prefixMin[0] = 0
		for i := 1; i < n; i++ {
			if p[i] < p[prefixMin[i-1]] {
				prefixMin[i] = i
			} else {
				prefixMin[i] = prefixMin[i-1]
			}
		}

		// Array to store the index of the minimum element in the suffix p[i...n-1]
		suffixMin := make([]int, n)
		suffixMin[n-1] = n - 1
		for i := n - 2; i >= 0; i-- {
			if p[i] < p[suffixMin[i+1]] {
				suffixMin[i] = i
			} else {
				suffixMin[i] = suffixMin[i+1]
			}
		}

		found := false
		// Iterate through possible middle elements j (indices 1 to n-2)
		for j := 1; j < n-1; j++ {
			// Find smallest element to the left of j
			iIdx := prefixMin[j-1]
			// Find smallest element to the right of j
			kIdx := suffixMin[j+1]

			// Check condition: p[i] < p[j] > p[k]
			if p[iIdx] < p[j] && p[kIdx] < p[j] {
				fmt.Fprintln(writer, "YES")
				// Output 1-based indices
				fmt.Fprintln(writer, iIdx+1, j+1, kIdx+1)
				found = true
				break
			}
		}

		if !found {
			fmt.Fprintln(writer, "NO")
		}
	}
}
```