使用python3的切片操作和强制类型转换
注意除数为0特判
n=input()
for i in range(int(n)):
a=input()
b=a[:len(a)//2]
c=a[-len(a)//2:]
try:
if (int(a)%(int(b)*int(c))==0):
print('Yes')
else:
print('No')
except:
print('No')