#!/usr/bin/env python3

import sys



YES = "Yes"  # type: str

NO = "No"  # type: str





def solve(S: str):

    N = len(S)

    a = S[0:int((N-1)/2)]

    b = S[int((N+3)/2)-1:N]

    if a == b[::-1]:

        Na = len(a)

        if Na % 2 == 0:

            aa = a[0:int(Na/2)]

            ab = a[int(Na/2):Na]

        else:

            aa = a[0:int((Na - 1) / 2)]

            ab = a[int((Na + 3) / 2)-1:Na]

        Nb = len(b)

        if Nb % 2 == 0:

            ba = b[0:int(Nb/2)]

            bb = b[int(Nb/2):Nb]

        else:

            ba = b[0:int((Nb - 1) / 2)]

            bb = b[int((Nb + 3) / 2)-1: Nb]

        if aa == ab[::-1] and ba == bb[::-1]:

            print(YES)

        else:

            print(NO)

        return

    print(NO)

    return





# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)

def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    S = next(tokens)  # type: str

    solve(S)





if __name__ == '__main__':

    main()

#!/usr/bin/env python3

import sys



YES = "Yes"  # type: str

NO = "No"  # type: str





def solve(S: str):

    N = len(S)

    a = S[0:int((N-1)/2)]

    b = S[int((N+3)/2)-1:N]

    print(YES) if S == S[::-1] and a == a[::-1] and b == b[::-1] else print(NO)

    return





# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)

def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    S = next(tokens)  # type: str

    solve(S)





if __name__ == '__main__':

    main()

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    N = len(S)
    a = S[0 : int((N - 1) / 2)]
    b = S[int((N + 3) / 2) - 1 : N]
    if a == b[::-1]:
        Na = len(a)
        if Na % 2 == 0:
            aa = a[0 : int(Na / 2)]
            ab = a[int(Na / 2) : Na]
        else:
            aa = a[0 : int((Na - 1) / 2)]
            ab = a[int((Na + 3) / 2) - 1 : Na]
        Nb = len(b)
        if Nb % 2 == 0:
            ba = b[0 : int(Nb / 2)]
            bb = b[int(Nb / 2) : Nb]
        else:
            ba = b[0 : int((Nb - 1) / 2)]
            bb = b[int((Nb + 3) / 2) - 1 : Nb]
        if aa == ab[::-1] and ba == bb[::-1]:
            print(YES)
        else:
            print(NO)
        return
    print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == "__main__":
    main()

#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(S: str):
    N = len(S)
    a = S[0 : int((N - 1) / 2)]
    b = S[int((N + 3) / 2) - 1 : N]
    print(YES) if S == S[::-1] and a == a[::-1] and b == b[::-1] else print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)


if __name__ == "__main__":
    main()

-    if a == b[::-1]: -        Na = len(a) -        if Na % 2 == 0: -            aa = a[0 : int(Na / 2)] -            ab = a[int(Na / 2) : Na] -        else: -            aa = a[0 : int((Na - 1) / 2)] -            ab = a[int((Na + 3) / 2) - 1 : Na] -        Nb = len(b) -        if Nb % 2 == 0: -            ba = b[0 : int(Nb / 2)] -            bb = b[int(Nb / 2) : Nb] -        else: -            ba = b[0 : int((Nb - 1) / 2)] -            bb = b[int((Nb + 3) / 2) - 1 : Nb] -        if aa == ab[::-1] and ba == bb[::-1]: -            print(YES) -        else: -            print(NO) -        return -    print(NO) +    print(YES) if S == S[::-1] and a == a[::-1] and b == b[::-1] else print(NO)