CODE FOR THE CHEFLAND ICE-CREAM PARLOUR PROBLEM. this is not working .can anyone find the problem

t=int(input())
c1=0
c2=0
c3=0
for i in range(0,t):
a=[]
n=int(input())
for j in range(0,n):
a[j]=int(input())

for j in range(0,n):
	if (a[j]!=5 or a[j]!=10 or a[j]!=15):
		break
	elif (a[j]==10):
		for k in range(0,j):
			if (a[k]==5):
				c1=c1+1
			if (c1>=1):
				print("Yes")
			else:
				print("No")
				
	elif (a[j]==15):
		for k in range(0,j):
			if (a[k]==5):
				c2=c2+1
			elif (a[k]==10):
				c3=c3+1
			if (c2>=2 and c3>=1):
				print("Yes")
			else:
				print("No")
	else:
                      print("yes")