← Home
```go
package main

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

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

	var t int
	if _, err := fmt.Fscan(in, &t); err != nil {
		return
	}

	for i := 0; i < t; i++ {
		var n int
		fmt.Fscan(in, &n)

		found := false
		// We are looking for distinct integers a, b, c >= 2 such that a * b * c = n.
		// Without loss of generality, assume a < b < c.
		// This implies a * a * a < n.
		for a := 2; a*a*a < n; a++ {
			if n%a == 0 {
				rem := n / a
				// We need to find b such that a < b < c and b * c = rem.
				// Since b < c, we must have b * b < rem.
				for b := a + 1; b*b < rem; b++ {
					if rem%b == 0 {
						c := rem / b
						// Found the triplet
						fmt.Fprintln(out, "YES")
						fmt.Fprintln(out, a, b, c)
						found = true
						break
					}
				}
			}
			if found {
				break
			}
		}

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