object Main {
  def main(args:Array[String]) = {
    /* 文字列を読み込み、空白で分割して配列にし、Int型にする */
    val in = readLine.split("")
    val retn = if( 2 == in.filter(_  == in(0)).size == in.filter(_  == in(1)).size == in.filter(_  == in(2)).size ){
      "Yes"
    } else{
      "No"
    }
    println (retn)
  }
}