import string

def is_palindrome(s):
    # Remove spaces and punctuation, convert to lowercase
    cleaned = ''.join(char.lower() for char in s if char.isalnum())
    return cleaned == cleaned[::-1]

# Input
s = input("Enter a string: ")

# Output
if is_palindrome(s):
    print("YES")
else:
    print("NO")