b=[] c=0 for i in input(): b.append(i) for i in range(len(b)//2): if b[i]==b[len(b)-i-1]: c+=2 if len(b)==c: print("YES") else: print("NO")