a='abbba'
num=len(a)
if num%2==0:
begin=0
end=len(a)-1
if a[begin] == a[end]:
print('yes')
else:
print('not')
else:
mid=num//2+1
a.replace('%s'%a[mid],'')
begin = 0
end = len(a) - 1
if a[begin] == a[end]:
print('yes')
else:
print('not')
a='abbba'
num=len(a)
if num%2==0:
begin=0
end=len(a)-1
if a[begin] == a[end]:
print('yes')
else:
print('not')
else:
mid=num//2+1
a.replace('%s'%a[mid],'')
begin = 0
end = len(a) - 1
if a[begin] == a[end]:
print('yes')
else:
print('not')