sub f{ my($a,$b)=@_; $a==0 || $b==0 || ($a&1)==0 && f($a>>1,$b-1) || ($b&1)==0 && f($a-1,$b>>1); } ($a,$b)=glob<>; print f($a,$b)?Yes:No;