Today Hayato came home from school with homework.

In the assignment, Hayato was given an array $a$ of length $n$. The task was to find $3$ numbers in this array whose sum is odd. At school, he claimed that there are such $3$ numbers, but Hayato was not sure, so he asked you for help.

Answer if there are such three numbers, and if so, output indices $i$, $j$, and $k$ such that $a_i + a_j + a_k$ is odd.

The odd numbers are integers that are not divisible by $2$: $1$, $3$, $5$, and so on.


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 10^4$) — the number of test cases.

For each test case, the first line contains one integer $n$ ($3 \le n \le 300$) — the length of $a$.

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \le a_i \le 10^5$) — the array $a$.

It is guaranteed that the sum of $n$ over all test cases does not exceed $2\cdot10^5$.


-----Output-----

For each test case, in the first line print one word "YES" (without quotes) if there are $3$ numbers with an odd sum or "NO" (without quotes) if there are no such $3$ numbers.

If the answer exists, then on the second line print $3$ distinct integers $i, j, k$ ($1 \le i, j, k \le n$) — the indices of the numbers. If there are several answers, output any.


-----Examples-----

Input
6
3
1 1 1
4
1 1 2 2
3
1 2 3
5
1 4 5 1 2
4
2 6 2 4
5
5 6 3 2 1
Output
YES
1 2 3
YES
3 4 1
NO
YES
1 3 4
NO
YES
1 3 5


-----Note-----

In the first test case, there is one way to choose $3$ numbers, and since $1 + 1 + 1 = 3$, this triple is fine for us.

In the second test case, you need to choose the numbers $1, 2, 2$, since $1 + 2 + 2 = 5$.

In the third test case, there is one way to choose three numbers, but $1 + 2 + 3 = 6$ is an even number, so the required triple does not exist.

In the fifth test case, no matter what three numbers we choose, their sum is even.

Difficulty: EASY
Tags: Greedy algorithms

Constructive algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
import sys
from math import *
from collections import defaultdict, deque
input = sys.stdin.readline
mod = 10 ** 9 + 7
INF = 1061109567
N = int(2 * 10 ** 5 + 5)
LINF = 4557430888798830399

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	idx1 = []
	idx2 = []
	for i in range(n):
		if a[i] & 1:
			idx1.append(i + 1)
		else:
			idx2.append(i + 1)
	if len(idx1) == 0:
		print('NO')
	elif len(idx1) == 1:
		print('YES')
		print(idx1[0], idx2[0], idx2[1], sep=' ')
	elif len(idx1) == 2:
		if len(idx2) <= 1:
			print('NO')
		else:
			print('YES')
			print(idx1[0], idx2[0], idx2[1], sep=' ')
	else:
		print('YES')
		print(idx1[0], idx1[1], idx1[2], sep=' ')
T = int(input())
for t in range(T):
	solve()


def solve(a):
	threeOdd = []
	oneOddTwoEvens = []
	evenCount = 0
	oddCount = 0
	for i in range(len(a)):
		if a[i] % 2 == 0:
			if evenCount < 2:
				oneOddTwoEvens.append(i + 1)
				evenCount += 1
		else:
			if len(threeOdd) < 3:
				threeOdd.append(i + 1)
			if len(oneOddTwoEvens) < 3 and oddCount < 1:
				oneOddTwoEvens.append(i + 1)
				oddCount += 1
	if len(threeOdd) == 3:
		return ['YES', threeOdd]
	if len(oneOddTwoEvens) == 3:
		return ['YES', oneOddTwoEvens]
	return ['NO']
t = int(input())
output = []
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	output.append(solve(a))
for answer in output:
	if len(answer) == 1:
		print('NO')
	else:
		print(answer[0])
		print(' '.join(map(str, answer[1])))


def program():
	n = int(input())
	a = [int(x) for x in input().split()]
	indices_odd = []
	indices_even = []
	answer = ''
	for i in range(0, len(a)):
		if a[i] % 2 != 0:
			indices_odd.append(str(i + 1))
			if len(indices_odd) == 3:
				break
		elif len(indices_even) < 2:
			indices_even.append(str(i + 1))
	if len(indices_odd) == 3:
		for i in range(0, len(indices_odd)):
			if i == len(indices_odd) - 1:
				answer = answer + indices_odd[i]
			else:
				answer = answer + indices_odd[i] + ' '
		answers.append(('YES', answer))
	elif len(indices_odd) >= 1 and len(indices_even) >= 2:
		for i in range(0, len(indices_even)):
			answer = answer + indices_even[i] + ' '
		answer = answer + indices_odd[0]
		answers.append(('YES', answer))
	else:
		answers.append(('NO', ''))
t = int(input())
answers = []
for i in range(0, t):
	program()
for i in answers:
	if i[0] == 'YES':
		print(i[0])
		print(i[1])
	else:
		print(i[0])


import sys
t = int(sys.stdin.readline())
for i in range(t):
	n = int(sys.stdin.readline())
	l = list(map(int, sys.stdin.readline().split()))
	res = []
	e = []
	o = []
	for i in range(n):
		if l[i] % 2 == 0:
			e.append(i)
		else:
			o.append(i)
	if len(o) >= 3:
		print('YES')
		res.append(o[0] + 1)
		res.append(o[1] + 1)
		res.append(o[2] + 1)
		print(*res)
	elif len(o) and len(e) >= 2:
		print('YES')
		res.append(o[0] + 1)
		res.append(e[0] + 1)
		res.append(e[1] + 1)
		print(*res)
	else:
		print('NO')


import sys
input = sys.stdin.readline
T = int(input())
for i in range(T):
	N = int(input())
	arr = list(map(int, input().split()))
	h = []
	z = []
	for a in range(N):
		if arr[a] % 2 == 0:
			z.append(a + 1)
		else:
			h.append(a + 1)
	if len(h) > 2:
		print('YES')
		print(' '.join(map(str, h[:3])))
	elif len(h) > 0 and len(z) > 1:
		print('YES')
		print(z[0], z[1], h[0])
	else:
		print('NO')


import sys
t = int(sys.stdin.readline())
odd = []
even = []
for _ in range(t):
	sys.stdin.readline()
	odd.clear()
	even.clear()
	for (i, n) in enumerate(map(int, sys.stdin.readline().split())):
		if n % 2:
			odd.append(i + 1)
		else:
			even.append(i + 1)
	if len(odd) >= 3:
		print('YES')
		print(' '.join(map(str, odd[:3])))
	elif len(odd) >= 1 and len(even) >= 2:
		print('YES')
		print(odd[0], end=' ')
		print(' '.join(map(str, even[:2])))
	else:
		print('NO')


import math
iter = int(input())
for _ in range(iter):
	n = int(input())
	a = list(map(int, input().split(' ')))
	e = []
	o = []
	for i in range(n):
		if a[i] % 2 == 0:
			e.append(i)
		else:
			o.append(i)
	if len(o) >= 3:
		print('YES')
		print(f'{o[0] + 1} {o[1] + 1} {o[2] + 1}')
	elif len(e) >= 2 and len(o) >= 1:
		print('YES')
		print(f'{o[0] + 1} {e[0] + 1} {e[1] + 1}')
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	(e, o) = ([], [])
	for i in range(n):
		if a[i] % 2 == 0:
			e.append(i + 1)
		else:
			o.append(i + 1)
	if o == []:
		print('NO')
	elif len(e) == 1 and n == 3:
		print('NO')
	else:
		print('YES')
		if len(o) >= 3:
			print(*o[:3])
		else:
			print(e[0], e[1], o[0])


def main():
	t = int(input())
	for _ in range(t):
		res = alg()
		print(res)

def alg():
	n = int(input())
	a = [int(x) for x in input().split()]
	res = 0
	odd = list()
	env = list()
	for i in range(n):
		if a[i] % 2 == 1:
			odd.append(i)
		else:
			env.append(i)
	if len(odd) > 0:
		if len(odd) == 1:
			return 'YES\n{0} {1} {2}'.format(odd[0] + 1, env[0] + 1, env[1] + 1)
		elif len(odd) == 2:
			if len(env) >= 2:
				return 'YES\n{0} {1} {2}'.format(odd[0] + 1, env[0] + 1, env[1] + 1)
			else:
				return 'NO'
		else:
			return 'YES\n{0} {1} {2}'.format(odd[0] + 1, odd[1] + 1, odd[2] + 1)
	else:
		return 'NO'
main()


ans = []
for i in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))[:n]
	even = 0
	odd = 0
	idxe = []
	idxo = []
	for j in range(n):
		if odd == 3:
			break
		if lst[j] % 2 != 0:
			idxo.append(j + 1)
			odd += 1
		else:
			idxe.append(j + 1)
			even += 1
	if (odd == 1 or odd == 2) and even >= 2:
		ans.append(['YES', [idxo[0], idxe[0], idxe[1]]])
	elif odd == 3:
		ans.append(['YES', idxo])
	else:
		ans.append('NO')
for i in range(len(ans)):
	if ans[i][0] == 'YES':
		print('YES')
		print(*ans[i][1])
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	odd = []
	even = []
	o = 0
	e = 0
	for i in range(n):
		if x[i] % 2 == 0:
			even.append(i + 1)
			e += 1
		else:
			odd.append(i + 1)
			o += 1
	if o > 2:
		print('YES')
		print(odd[0], odd[1], odd[2])
	elif o > 0 and e > 1:
		print('YES')
		print(odd[0], even[0], even[1])
	else:
		print('NO')


import os.path
from math import gcd, floor, ceil
from collections import *
import sys
mod = 1000000007
INF = float('inf')

def st():
	return list(sys.stdin.readline().strip())

def li():
	return list(map(int, sys.stdin.readline().split()))

def mp():
	return map(int, sys.stdin.readline().split())

def inp():
	return int(sys.stdin.readline())

def pr(n):
	return sys.stdout.write(str(n) + '\n')

def prl(n):
	return sys.stdout.write(str(n) + ' ')
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
t = inp()
for i in range(t):
	n = inp()
	l = li()
	(k, k1) = (0, 0)
	(l1, l2) = ([], [])
	for i in range(n):
		if l[i] % 2 == 0 and k < 2:
			l1.append(i + 1)
			k += 1
		elif l[i] % 2 != 0 and k1 < 3:
			l2.append(i + 1)
			k1 += 1
	if len(l2) == 3:
		print('YES')
		print(*l2)
	elif len(l1) == 2 and len(l2) >= 1:
		print('YES')
		print(l1[0], l1[1], l2[0])
	else:
		print('NO')


t = int(input().strip())
for i in range(t):
	n = int(input().strip())
	lst = []
	arr = [int(ele) for ele in input().strip().split()]
	count = 0
	odd = []
	even = []
	for ele in range(len(arr)):
		if arr[ele] & 1 == 1:
			odd.append(ele + 1)
			count += 1
		else:
			even.append(ele + 1)
		if count == 3:
			break
	if count == 0:
		print('NO')
	elif count == 3:
		print('YES')
		print(f'{odd[0]} {odd[1]} {odd[2]}')
	elif count == 1:
		print('YES')
		print(f'{odd[0]} {even[0]} {even[1]}')
	elif len(even) == 1:
		print('NO')
	else:
		print('YES')
		print(f'{odd[0]} {even[0]} {even[1]}')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	even = list()
	odd = list()
	for (i, x) in enumerate(a):
		if x % 2:
			odd.append(i + 1)
		else:
			even.append(i + 1)
	if len(odd) > 2:
		print('YES')
		print(odd[0], odd[1], odd[2])
	elif len(odd) > 0 and len(even) > 1:
		print('YES')
		print(odd[0], even[0], even[1])
	else:
		print('NO')


t = int(input())
A = []
for i in range(t):
	n = int(input())
	a = [int(p) for p in input().split()]
	A.append(a)
for i in range(t):
	arr = A[i]
	even = [x for x in arr if x % 2 == 0]
	odd = [x for x in arr if x % 2 == 1]
	if len(odd) == 0 or (len(odd) == 2 and len(even) == 1):
		print('NO')
	else:
		print('YES')
		if len(odd) >= 3:
			for j in range(3):
				if j < 2:
					print(arr.index(odd[j]) + 1, end=' ')
					arr[arr.index(odd[j])] = 'x'
				else:
					print(arr.index(odd[j]) + 1)
		else:
			print(arr.index(odd[0]) + 1, end=' ')
			print(arr.index(even[0]) + 1, end=' ')
			arr[arr.index(even[0])] = 'x'
			print(arr.index(even[1]) + 1)


tests = int(input())
main_list = []
for i in range(tests):
	input()
	a = list(map(int, input().split()))
	main_list.append(a)
ans_list = []
yes_no = []
for i in main_list:
	even = []
	odd = []
	for num in range(len(i)):
		if i[num] % 2 == 0:
			even.append(num + 1)
		else:
			odd.append(num + 1)
	if len(odd) >= 3:
		print('YES')
		print(f'{odd[0]} {odd[1]} {odd[2]}')
	elif len(odd) >= 1 and len(even) >= 2:
		print('YES')
		print(f'{even[0]} {even[1]} {odd[0]}')
	else:
		print('NO')


def main():
	_i = int(input())
	for _ in range(_i):
		n = int(input().strip('\r\n'))
		a = [int(x) for x in input().strip('\r\n').split()]
		oddidx = [i + 1 for (i, x) in enumerate(a) if x % 2 == 1]
		evenidx = [i + 1 for (i, x) in enumerate(a) if x % 2 == 0]
		if len(oddidx) >= 3:
			print('YES')
			print(' '.join([str(x) for x in oddidx[:3]]))
		elif len(evenidx) >= 2 and oddidx:
			print('YES')
			print(' '.join([str(x) for x in oddidx[:1] + evenidx[:2]]))
		else:
			print('NO')
main()


t = int(input())
for test in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	cnc = 0
	i1 = -1
	i2 = -1
	i3 = -1
	cnd = 0
	i4 = -1
	i5 = -1
	i6 = -1
	for i in range(n):
		if a[i] % 2 == 0:
			cnd += 1
			if i4 == -1:
				i4 = i
			elif i5 == -1:
				i5 = i
			else:
				i6 = i
		else:
			cnc += 1
			if i1 == -1:
				i1 = i
			elif i2 == -1:
				i2 = i
			else:
				i3 = i
	if cnc == 0 or (cnc <= 2 and cnd <= 1):
		print('NO')
	else:
		print('YES')
		if cnc >= 3:
			print(i1 + 1, i2 + 1, i3 + 1)
		else:
			print(i1 + 1, i4 + 1, i5 + 1)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	odds = []
	evens = []
	for i in range(len(arr)):
		if arr[i] % 2 == 0:
			evens.append(i + 1)
		else:
			odds.append(i + 1)
	if len(odds) >= 3:
		print('YES')
		print(odds[0], odds[1], odds[2])
	elif len(odds) >= 1 and len(evens) >= 2:
		print('YES')
		print(odds[0], evens[0], evens[1])
	else:
		print('NO')


import sys
from math import gcd, sqrt, ceil, log

def li():
	return [int(i) for i in sys.stdin.readline().split()]

def si():
	return sys.stdin.readline().split()

def ii():
	return int(input())

def ip():
	return input()
for tastcas in range(int(input())):
	n = ii()
	b = li()
	b = [i % 2 for i in b]
	odds = b.count(1)
	evens = b.count(0)
	odd = 0
	even = 0
	if odds >= 3:
		print('YES')
		for i in range(n):
			if b[i] == 1:
				print(i + 1, end=' ')
				odd += 1
			if odd == 3:
				break
	elif odds >= 1 and evens >= 2:
		print('YES')
		for i in range(n):
			if odd < 1 and b[i] == 1:
				print(i + 1, end=' ')
				odd += 1
			if even < 2 and b[i] == 0:
				print(i + 1, end=' ')
				even += 1
			if odd >= 1 and even >= 2:
				break
	else:
		print('NO', end='')
	print()


def exe():
	le = []
	lo = []
	for i in range(n):
		if lst[i] % 2 == 0:
			le += [i + 1]
		else:
			lo += [i + 1]
	if len(lo) >= 3:
		print('YES')
		print(lo[0], lo[1], end=' ')
		return lo[2]
	elif len(le) >= 2 and len(lo) >= 1:
		print('YES')
		print(le[0], le[1], end=' ')
		return lo[0]
	else:
		return 'NO'
for i in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	print(exe())


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	odd = []
	even = []
	for i in range(len(l)):
		if l[i] % 2 == 0:
			even.append(i)
		else:
			odd.append(i)
	if len(odd) >= 3:
		print('YES')
		print(odd[0] + 1, odd[1] + 1, odd[2] + 1)
	elif len(odd) >= 1 and len(even) >= 2:
		print('YES')
		print(odd[0] + 1, even[0] + 1, even[1] + 1)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	(ans, indexes) = ('NO', [])
	(odd, even) = ([], [])
	for i in range(len(a)):
		if a[i] % 2 == 0:
			even.append(i + 1)
		else:
			odd.append(i + 1)
	if len(odd) > 2:
		ans = 'YES'
		indexes = [odd[0], odd[1], odd[2]]
	elif len(odd) == 0:
		ans = 'NO'
	elif len(odd) < 3 and len(even) > 1:
		ans = 'YES'
		indexes = [odd[0], even[0], even[1]]
	if ans == 'YES':
		print('YES')
		print(*indexes)
	else:
		print('NO')


for i in range(int(input())):
	int(input())
	a = list(map(int, input().split()))
	b = []
	for z in a:
		b.append(z % 2)
	if b.count(1) > 2:
		print('YES')
		print(b.index(1) + 1, end=' ')
		b.remove(1)
		print(b.index(1) + 2, end=' ')
		b.remove(1)
		print(b.index(1) + 3)
	elif b.count(1) > 0 and b.count(0) > 1:
		print('YES')
		print(min(b.index(0), b.index(1)) + 1, end=' ')
		print(max(b.index(0), b.index(1)) + 1, end=' ')
		b.remove(0)
		print(b.index(0) + 2)
	else:
		print('NO')


for _ in range(int(input())):
	input()
	a = list(map(int, input().split()))
	l1 = []
	l2 = []
	for i in range(len(a)):
		if a[i] % 2 == 0:
			l2.append(i + 1)
		else:
			l1.append(i + 1)
	if len(l1) >= 3:
		print('YES')
		print(' '.join([str(j) for j in l1[:3]]))
	elif len(l2) >= 2 and len(l1) >= 1:
		print('YES')
		new = [str(j) for j in l2[:2]]
		new.append(str(l1[0]))
		new.sort()
		print(' '.join(new))
	else:
		print('NO')


def main():
	t = int(input())
	for i in range(0, t):
		n = int(input())
		a = [int(x) for x in input().split(' ')]
		res = []
		odd_indices = []
		even_indices = []
		for (j, num) in enumerate(a):
			if num % 2 == 0:
				even_indices.append(j)
			else:
				odd_indices.append(j)
		if len(odd_indices) == 0 or (len(odd_indices) == 2 and len(even_indices) == 1):
			print('NO')
		elif len(odd_indices) < 3:
			print('YES')
			print(odd_indices[0] + 1, even_indices[0] + 1, even_indices[1] + 1)
		else:
			print('YES')
			print(odd_indices[0] + 1, odd_indices[1] + 1, odd_indices[2] + 1)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	(o, e) = (0, 0)
	(odd, even) = ([], [])
	for i in range(len(x)):
		if x[i] & 1 == 0:
			even.append(i + 1)
			e += 1
		else:
			odd.append(i + 1)
			o += 1
			if o >= 3:
				break
	if o >= 3:
		print('YES')
		print(odd[0], odd[1], odd[2])
	elif o >= 1 and e >= 2:
		print('YES')
		print(odd[0], even[0], even[1])
	else:
		print('NO')


a = int(input())
for i in range(a):
	b = int(input())
	c = list(map(int, input().split()))
	r = 0
	t = 0
	y = []
	u = []
	for q in range(b):
		if c[q] % 2 == 0:
			y.append(q + 1)
			r += 1
		else:
			u.append(q + 1)
			t += 1
	if t > 2:
		print('YES')
		print(u[0], u[1], u[2])
	elif t > 0 and r > 1:
		print('YES')
		print(u[0], y[0], y[1])
	else:
		print('NO')


t = int(input())
outputbool = []
outputindex = []
for i in range(2 * t):
	lst = list(map(int, input().split()))
	if i & 1 == 0:
		n = lst[0]
	else:
		numofeven = 0
		numofodd = 0
		outputodd = []
		outputeven = []
		for i in range(n):
			if lst[i] & 1 == 0:
				numofeven += 1
				outputeven.append(i + 1)
			else:
				numofodd += 1
				outputodd.append(i + 1)
		if numofodd >= 3:
			outputbool.append('YES')
			outputindex.append(outputodd[0:3])
		elif numofodd >= 1 and numofeven >= 2:
			outputbool.append('YES')
			outputindex.append(outputodd[0:1] + outputeven[0:2])
		else:
			outputbool.append('NO')
			outputindex.append(0)
for i in range(t):
	print(outputbool[i])
	if outputbool[i] == 'YES':
		for j in range(3):
			if j != 2:
				print(outputindex[i][j], end=' ')
			else:
				print(outputindex[i][j])


k = int(input())
for j in range(k):
	n = int(input())
	kol = 0
	m = 0
	sm = 0
	a = 0
	l = [int(i) for i in input().split()]
	l1 = []
	for i in range(n):
		if l[i] % 2 != 0:
			l1.append(i + 1)
	if len(l1) >= 3:
		print('YES')
		print(*l1[0:3])
	elif len(l1) == 0:
		print('NO')
	else:
		if len(l1) == 2:
			l1.pop()
		for i in range(n):
			if l[i] % 2 == 0:
				l1.append(i + 1)
		if len(l1) >= 3:
			print('YES')
			print(*l1[0:3])
		else:
			print('NO')


n = int(input())
for i in range(n):
	m = int(input())
	v = list(map(int, input().split()))
	v1 = []
	v2 = []
	for j in range(m):
		if v[j] % 2 != 0:
			v1.append(j + 1)
		else:
			v2.append(j + 1)
	if len(v1) >= 3:
		print('YES')
		print(v1[0], v1[1], v1[2])
	elif len(v1) >= 1 and len(v2) >= 2:
		print('YES')
		print(v1[0], v2[0], v2[1])
	else:
		print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = []
	s = []
	for i in range(n):
		if a[i] % 2 == 0:
			l.append(i)
		else:
			s.append(i)
	if len(s) > 2:
		print('YES')
		print(s[0] + 1, s[1] + 1, s[2] + 1)
	elif len(s) == 1 and len(l) > 1 or (len(s) > 0 and len(l) > 1):
		print('YES')
		print(l[0] + 1, l[1] + 1, s[0] + 1)
	else:
		print('NO')


n = int(input())
a = [0 for i in range(n)]
y_n = [0 for i in range(n)]

def countOdd(li, li_len):
	cnt = 0
	for j in range(li_len):
		if li[j] % 2 == 1:
			cnt += 1
	return cnt
for i in range(n):
	printli = []
	k = int(input())
	li = list(map(int, input().split()))
	if countOdd(li, k) >= 3:
		y_n[i] = 1
		for j in range(k):
			if li[j] % 2 == 1:
				printli.append(j + 1)
		a[i] = printli
	elif countOdd(li, k) == 1 or (countOdd(li, k) == 2 and k >= 4):
		y_n[i] = 1
		count = 0
		odd_count = 0
		for j in range(k):
			if li[j] % 2 == 1 and odd_count == 0:
				printli.append(j + 1)
				odd_count = 1
			elif li[j] % 2 == 0 and count < 2:
				printli.append(j + 1)
				count += 1
		a[i] = printli
	else:
		y_n[i] = 0
for i in range(n):
	if y_n[i] == 1:
		print('YES')
		for j in range(3):
			print(a[i][j], end=' ')
		print()
	else:
		print('NO')


t = int(input())
for _ in range(t):
	len_list = int(input())
	num_list = list(map(int, input().split()))
	exist = False
	i = 0
	j = 0
	k = 0
	remainders = {1: [], 0: []}
	for x in range(len_list):
		remainders[num_list[x] % 2].append(x + 1)
	if len(remainders[1]) >= 3:
		(i, j, k) = remainders[1][:3]
		exist = True
	elif len(remainders[1]) >= 1 and len(remainders[0]) >= 2:
		i = remainders[1][0]
		(j, k) = remainders[0][:2]
		exist = True
	if exist:
		print('YES')
		print(i, j, k)
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	even = []
	odd = []
	for i in range(1, n + 1):
		if arr[i - 1] % 2:
			odd.append(i)
		else:
			even.append(i)
	if len(odd) > 2:
		print('YES')
		print(odd[0], odd[1], odd[2])
	elif odd and len(even) > 1:
		print('YES')
		print(odd[0], even[0], even[1])
	else:
		print('NO')


for _ in range(int(input())):
	input()
	a = [int(x) for x in input().split()]
	v = [i for (i, x) in enumerate(a) if x % 2 == 1]
	w = [i for (i, x) in enumerate(a) if x % 2 == 0]
	if len(v) >= 3:
		print('YES')
		print(v[0] + 1, v[1] + 1, v[2] + 1)
	elif len(v) >= 1 and len(w) >= 2:
		print('YES')
		print(v[0] + 1, w[0] + 1, w[1] + 1)
	else:
		print('NO')


def solve(a):
	odd = []
	even = []
	for i in range(len(a)):
		if a[i] % 2 == 0:
			even.append(i + 1)
		else:
			odd.append(i + 1)
	if len(odd) >= 3:
		print('YES')
		print('{} {} {}'.format(odd[0], odd[1], odd[2]))
	elif len(odd) >= 1 and len(even) >= 2:
		print('YES')
		print('{} {} {}'.format(odd[0], even[0], even[1]))
	else:
		print('NO')
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	solve(a)


n = int(input())
for _ in range(n):
	m = int(input())
	vals = list(map(int, input().split()))
	pary = [[], []]
	for i in range(m):
		pary[vals[i] % 2].append(i + 1)
	if len(pary[1]) > 2:
		print('YES')
		print(pary[1][0], pary[1][1], pary[1][2])
	elif len(pary[1]) > 0 and len(pary[0]) > 1:
		print('YES')
		print(pary[1][0], pary[0][0], pary[0][1])
	else:
		print('NO')


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	d = {'even': [], 'odd': []}
	for i in range(n):
		if l[i] % 2 == 0:
			d['even'].append(i + 1)
		else:
			d['odd'].append(i + 1)
	if len(d['odd']) >= 3:
		l = d['odd'][:3]
		print('YES')
		print(*l)
	elif len(d['odd']) >= 1 and len(d['even']) >= 2:
		l = [d['odd'][0], d['even'][0], d['even'][1]]
		print('YES')
		print(*l)
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	ev = 0
	od = 0
	for j in lst:
		if j % 2 == 0:
			ev += 1
		else:
			od += 1
	if od >= 3:
		print('YES')
		ans = []
		for j in range(n):
			if lst[j] % 2 != 0:
				ans.append(j + 1)
			if len(ans) == 3:
				break
		print(*ans)
	elif od >= 1 and ev >= 2:
		print('YES')
		ans = []
		for j in range(n):
			if lst[j] % 2 != 0:
				ans.append(j + 1)
			if len(ans) == 1:
				break
		for j in range(n):
			if lst[j] % 2 == 0:
				ans.append(j + 1)
			if len(ans) == 3:
				break
		print(*ans)
	else:
		print('NO')


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	(eve, od) = ([], [])
	for i in range(n):
		if a[i] % 2 == 0:
			eve.append(i + 1)
		else:
			od.append(i + 1)
	if od == []:
		print('NO')
	elif len(eve) == 1 and n == 3:
		print('NO')
	else:
		print('YES')
		if len(od) >= 3:
			print(*od[:3])
		else:
			print(eve[0], eve[1], od[0])
for i in range(int(input())):
	solve()