package abc158

object Main extends App {
  A.main(args)
}

object A extends App {
  val station_num = io.StdIn.readLine.toCharArray.distinct.length
  if(station_num == 2) println("Yes")
  else println("No")
}
