palindrome-check-2

You have been given a String S. You need to find and print whether this string is a palindrome or not. If yes, print "YES" (without quotes), else print "NO" (without quotes). 

Input Format
The first and only line of input contains the String S. The String shall consist of lowercase English alphabets only.

Output Format
Print the required answer on a single line.  

Constraints
 1 ≤ |S| ≤ 100   

Note
String S consists of lowercase English Alphabets only.   

SAMPLE INPUT
aba

SAMPLE OUTPUT
YES

Source: hackerearth | Difficulty: EASY


Solutions:
a = input()
b ="".join(reversed(a))
if a == b:
	print("YES")
else:
	print("NO")
	
	


a=input("")
b=reversed(a)
if list(a) == list(b):
	print("YES")
else:
	print("NO")


a=input("")
b=reversed(a)
if list(a) == list(b):
	print("YES")
else:
	print("NO")


a=input()
b=''.join(reversed(a))
if a == b:
	print(" YES")
else:
	print("NO")


str1=input()
str2=reversed(str1)
if list(str1) == list(str2):
	print("YES")
else:
	print("NO")


n=input('')
def palindrome(n):
	index=0
	check=True
	while index<len(n):
		if n[index]==n[-1-index]:
			index+=1
			return True
		return False
if palindrome(n)==True:
	print("YES")
else:
	print("NO")


a=input()
b=a[::-1]
if(a==b):
	print("YES")
else:
	print("NO")


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
n=input()
def palindrome(n):
	return (n == n[::-1])
if palindrome(n)==True:
	print("YES")
else:
	print("NO")


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
string  = input()
s1 = string.lower()
s2 = s1[::-1]
if s1 == s2:
	print("YES")
else:
	print("NO")



def palindrome(word):
	word_rev = reversed(word)
	if list(word) == list(word_rev):
		print('YES')
	else:
		print('NO')

palindrome(input())


a=input(" ")
b="".join(reversed(a))
if a == b :
	print("YES")
else:
	print("NO")


'''
# Read input from stdin and provide input before running code

'''
ispal = False
s = input() 
len = len(s)
for i in range (0, len/2):
	if (s[i]==s[len-1-i]):
	    ispal = True
	else: 
		ispal = False
    	break; 
if (ispal):
	print("YES")
else: 
	print("NO")


string = input()

if string == string[::-1]:
	print('YES')
else:
	print('NO')


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''

inputString = input()
s1 = inputString.lower()
s2 = s1[::-1]
if s1 == s2 :
	print("YES")
else:
	print("NO")



'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''

inputString = input()
s1 = inputString.lower()
s2 = s1[::-1]
if s1 == s2 :
	print("YES")
else:
	print("NO")



# Read input from stdin and provide input before running code

name = str(input(''))
#print '%s.' % name
reverse = name[::-1]
if name==reverse:
	print('YES')
else:
	print('NO')


cadena=input()
j=len(cadena)-1
for i in range(len(cadena)):
	if cadena[i] != cadena[j]:
		bandera=0
	else:
		bandera=1
	j=j-1

if bandera==1:
	print("YES")
else:
	print("NO")



a=input()
b=reversed(a)
if list(a)==list(b):
	print("YES")
else:
	print("NO")


a=input()

b="".join(reversed(a))
if a == b:
	print("YES")
else :
	print(" NO ")


t=input("")
def palindromic(x):
	if (x.lower() and len(x)>=1 and len(x)<=100):
		rev=''.join(reversed(x))
		if (x==rev):
			print('YES')
		else:
			print('NO')


palindromic(t)



def stringCompare(arg1,arg2):
	"""TODO: Docstring for stringCompare.finding if one string is equal to other

	:arg1: TODO

	:arg1: TODO
	:returns: TODO

	"""
	if len(arg1)==len(arg2):
		for j in range(len(arg1)):
			if arg1[j]==arg2[j]:
				if j==len(arg1)-1:
					return True
	#if the function hasn't returned true by this stage then they are not equal
		return False 
	else:
		return False
  
def reverseString(arg1):
	"""TODO: Docstring for function. to reverse a given string.

	:arg1: a string 
	:returns: return the reversed string 

	"""
	string=  arg1[::-1] 
	return string
def splitMiddle(arg1):
	"""TODO: Docstring for function.to split any given string to two equal halves

	:arg1: string to be split 
	:returns: two parts 

	"""
	length=len(arg1)
	part1=length/2

	if length%2==1:
		length_part1=part1
		length_part2=part1+1
	else:
		length_part1=part1
		length_part2=part1

	strpart1=arg1[:length_part1]
	strpart2=arg1[length_part2:length]
	return strpart1,strpart2

def checkPallindrome(arg1):
	"""a funciotn to check if a string is a pallindrome

	:arg1: is the string to be checked 
	:returns: a string  

	"""
	string=arg1
	first,second=splitMiddle(string)
	if stringCompare(first,reverseString(second)):
			return "YES"
	else:
			return"NO"

string = input() 
print(checkPallindrome(string))


import sys


s = sys.stdin.readlines()[0].strip()

if s == s[::-1]:
	print("YES")
else:
	print("NO")


import string
s=input()
t=s[::-1]
if s==t:
	print("YES")
else:
	print("NO")



'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
sequence = input()


def test_palindrome(s):
	if sequence == sequence[::-1]:
		print("YES")
	else:
		print("NO")

test_palindrome(sequence)
	


'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
s = input()
lis = list(s)
if lis == list(reversed(lis)):
	print("YES")
else:
	print("NO")


name=input()
revname=reversed(name)
if list(name)==list(revname):
	print("YES")
else:
	print("NO")



def stringCompare(arg1,arg2):
	"""TODO: Docstring for stringCompare.finding if one string is equal to other

	:arg1: TODO

	:arg1: TODO
	:returns: TODO

	"""
	if len(arg1)==len(arg2):
		for j in range(len(arg1)):
			if arg1[j]==arg2[j]:
				if j==len(arg1)-1:
					return True
	#if the function hasn't returned true by this stage then they are not equal
		return False 
	else:
		return False
  
def reverseString(arg1):
	"""TODO: Docstring for function. to reverse a given string.

	:arg1: a string 
	:returns: return the reversed string 

	"""
	string=  arg1[::-1] 
	return string
def splitMiddle(arg1):
	"""TODO: Docstring for function.to split any given string to two equal halves

	:arg1: string to be split 
	:returns: two parts 

	"""
	length=len(arg1)
	part1=length/2

	if length%2==1:
		length_part1=part1
		length_part2=part1+1
	else:
		length_part1=part1
		length_part2=part1

	strpart1=arg1[:length_part1]
	strpart2=arg1[length_part2:length]
	return strpart1,strpart2

def checkPallindrome(arg1):
	"""a funciotn to check if a string is a pallindrome

	:arg1: is the string to be checked 
	:returns: a string  

	"""
	string=arg1
	first,second=splitMiddle(string)
	if stringCompare(first,reverseString(second)):
			return "YES"
	else:
			return"NO"

string = input() 
print(checkPallindrome(string))


str0=input()
if ( str0 == str0[::-1]):
	print('YES')
else:
	print('NO')