a = io.read() if a:byte(1) == a:byte(2) and a:byte(2) ~= a:byte(3) then print("Yes") else print("No") end