What did a actor that M3 and M4 starred produce and M0 and M1 write
SELECT DISTINCT ?x0 WHERE {
?x0 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
?x0 ns:film.film.written_by M0 .
?x0 ns:film.film.written_by M1 .
?x1 a ns:film.actor .
?x1 ns:film.actor.film/ns:film.performance.film M3 .
?x1 ns:film.actor.film/ns:film.performance.film M4
}