BEGIN{FS="/"}{if($3~$2&&$4~$2){print"No";next}r=$4;for(;;){sub($2,$3,$4);if($4!~$2){print"Yes";break}if($4~r){print"No";next}}}