import java.io.*;
import java.util.*;

public class missme_pk_40 {

	void solve() throws IOException {
		String s = nextToken();
		if (s.length() > 100)
			throw new AssertionError();
		ArrayList<Character> bad = new ArrayList<Character>();
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				bad.add(s.charAt(i));
				bad.add(s.charAt(s.length() - 1 - i));
			}
		}
		Collections.sort(bad);
		if (bad.size() == 0) {
			out.println("Yes");
			return;
		}
		if (bad.size() == 4 && bad.get(0) == bad.get(1)
				&& bad.get(2) == bad.get(3)) {
			out.println("Yes");
			return;
		}
		if (bad.size() == 2
				&& s.length() % 2 == 1
				&& (s.charAt(s.length() / 2) == bad.get(0) || s.charAt(s
						.length() / 2) == bad.get(1))) {
			out.println("Yes");
			return;
		}
		out.println("No");
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;

	void run() {
		try {
			// br = new BufferedReader(new InputStreamReader(System.in));
			// out = new PrintWriter(System.out);

			br = new BufferedReader(new FileReader(new File("missme.in")));
			out = new PrintWriter("missme.out");
			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new missme_pk_40().run();
	}

	String nextToken() throws IOException {
		while ((st == null) || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}
}
