let str1 = readLine()!
    let str2 = readLine()!
    
    let charArr = str2.map{($0)}
    var str: String = ""
    
    var s: Int = 0
    
    for i in 0 ..< charArr.count {
      
      str += String(charArr[i])
      
      if str == str1 {
        
        s += 1
        break
      }
      
    }
    
    if s == 1 {
      print("Yes")
    } else {
      print("No")
    }