filter(prime,[x|xs1],ys0):-x mod prime＝\＝0|ys0＝[x|ys1],filter(prime,xs1,ys1).