import scala.io.{StdIn => in}
import scala.collection.{mutable => mu}

object Main extends App {
  val map = mu.HashMap.empty[Char,Int]
  in.readLine.foreach(addOrUpdate(map,_,1))
  val ans = if(map.values.exists(_ > 2)) "Yes" else "No"
  println(ans)


  @inline
  def addOrUpdate
    (map:mu.HashMap[Char,Int], key:Char, value:Int):mu.HashMap[Char,Int] =
  {
    if(map.contains(key)) map(key) += value
    else map += (key -> value)
    map
  }
}