t= int(input())
ar=[]
chk=0
x=0
y=0
while(t>0)
i=int(input())
for l in range(i):
ar= int(input())
for l in range(i-1):
for m in range(l+1,i):
x=ar[l]
y=ar[m]
k=x*y
if k in ar:
continue
else:
chk=chk+1
print(True)
if chk>0:
print(False)
t-=1
Error:
x=ar[l]
TypeError: 'int' object is not subscriptable
in this program i am tryng to print true if all the all the pairs in the array follow the relation x= a*b where x is any element in array and a abd b are the elements of the pair.
aris an integer:ar = int(input()). You can't subscript an integer.ar[l] = int(input())instead ofar= int(input())