import java.util.Scanner


object Main extends App {

  val sc = new Scanner(System.in)
  val s = sc.nextLine()
  val t = sc.nextLine()

  t.startsWith(s) match {
    case true => print("Yes")
    case false => print("No")
  }

}
