var
  s: string;
  i, n, bad: longint;
  l1, l2, r1, r2: char;

begin
  assign(input, 'missme.in');
  assign(output, 'missme.out');
  reset(input);
  rewrite(output);
  readln(s);
  n := length(s);
  bad := 0;
  for i := 1 to n div 2 do 
  begin
    if (s[i] <> s[n - i + 1]) then
    begin
      l1 := l2;
      r1 := r2;
      l2 := s[i];
      r2 := s[n - i + 1];
      bad := bad + 1;
    end;
  end;
  if (bad > 2) or (bad = 0) and (n = 1) or (bad = 1) and (n mod 2 = 0) then
  begin
    writeln('No');
    halt(0);
  end;
  if (bad = 0) then writeln('Yes');
  if (bad = 1) then
    if (s[n div 2 + 1] = r2) or (s[n div 2 + 1] = l2) then writeln('Yes') else writeln('No'); 
  if (bad = 2) then
    if (l1 = r2) and (l2 = r1) or (l1 = l2) and (r1 = r2) then writeln('Yes') else writeln('No'); 
end.
