NZEC error as well as wrong answer. what is going wrong?

test = int(input())
for i in range(test):
n = int(input())
j1=j2=0
c = n
for i in range(len(str(n))):
if(c%10 == 1):
j1 = j1+1
c = c-1
c = c/10
elif(c%10 == 0):
j2 = j2+1
c = c/10
if(j1 == 1 and j1 != j2):
print(“Yes”)
elif(j2 == 1 and j2 != j1):
print(“Yes”)
else:
print(“No”)