using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace proconRCO2017
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine();
            char[] arr = input.ToCharArray();
            GetPer(arr);
            Console.ReadLine();
        }

        private static void Swap(ref char a, ref char b)
        {
            if (a == b) return;

            a ^= b;
            b ^= a;
            a ^= b;
        }

        public static void GetPer(char[] list)
        {
            int x = list.Length - 1;
            string ans = "";
            if (GetPer(list, 0, x))
            {
                ans += "NO";
            }
            else
            {
                ans += "YES";
            }
            Console.WriteLine(ans);

        }

        private static bool GetPer(char[] list, int k, int m)
        {
            if (k == m)
            {
                var myStrig = new String(list);
                return !CheckPollisition(myStrig);

            }
            else
                for (int i = k; i <= m; i++)
                {
                    Swap(ref list[k], ref list[i]);
                    if (!GetPer(list, k + 1, m)) return true;
                    Swap(ref list[k], ref list[i]);
                }

            return false;
        }

        private static bool CheckPollisition(string myString)
        {
            // check position
            string first = myString.Substring(0, myString.Length / 2);
            char[] arr = myString.ToCharArray();
            Array.Reverse(arr);
            string temp = new string(arr);
            string second = temp.Substring(0, temp.Length / 2);

            bool check = true;

            for (var i = 0; i < myString.Length - 2; ++i)
            {
                if (myString[i] == myString[i + 1])
                {
                    check = true;
                    break;
                }
                check = false;
            }
               
            return false;

            var checking = first.Equals(second) && check;
            return checking;
        }
    }
}