while True:
    checks = 0
    ins = input()
    str_list = []
    if ins == '0':
        break
    for repeat in range(0, len(ins)):
        str_list.append(ins[repeat].lower())
    while len(str_list) > 1:
        if str_list.pop(0) != str_list.pop():
            checks = 1
    if checks == 0:
        print('yes')
    else:
        print('no')
양쪽에서 수를 빼주면서 같은지 확인하면 된다.
