import java.util.*

fun main(args: Array<String>) {
    val scan = Scanner(System.`in`)
    var a=scan.nextLine()
    var b=scan.nextLine()
        var c= ""

    for(i in 0..a.length-1)
    {
        c+=b[i]
    }
    if(a==c)
        println("Yes")
    else
        println("No")
}
