computer architecture – Changing the combinatorial circuit as little as possible to present correct prime numbers?

I’m very new to CS and I’ve been thinking long and hard about a certain problem of an exercise.

We are given a combinatorial circuit which is supposed to show prime numbers for y=1, however, it doesn’t work for the number 2, for 2 it’s y=0.

Here is the operator tree.

And the combinatorial circuit:

I’ve already constructed a new combinatorial circuit with minimal polynomial (making a draft for a new table, new dnf form, minimalising it, etc). The exercise states this is exactly what you are NOT supposed to do.
You are supposed to repair it, with as little change as possible.

So, I’ve tried to negate some conjunctions from the original DNF, and changing the AND3 gates to AND2 Gates to AND4 gates. etc, etc. None of this worked.

I’m getting crazy here, is there any easy solution I overlooked?

Any help would be really appreciated!
I’m very sorry for my bad English.
Thank you so much for reading.