<>;($a,$b)=glob<>;print$a==1|$b==1|$a==$b?Yes:No