object Main{
  def main(args: Array[String]){
    val input=io.Source.stdin.getLines().mkString("\n")
    println(solve(input).trim())
  }

  def solve(input:String):String={
    val Array(s1,s2)=input.split("\n").map(_.toList)
    if(s1(1)==s2(1) && s1(0)==s2(2) && s1(2)==s2(0)){
      "YES"
    }else{
      "NO"
    }
  }
}
