$/=z;$s=<>;print grep$s!~/^[^$_]+Y|$_.+N/m,0..9