Is it right to use "both" in negative sentences?

Solution 1:

Without hearing the full context, there may be a danger of confusion. Both may convey a sense of each as in both dogs are blue or it may convey a sense of a combined entity or occurrence, it's dangerous when it is both raining and snowing.

While the latter meaning is more common when both is a conjunction rather than a determiner or pronoun, that is not always the case. I'll pay you when I get both.

When there is a negative in the sentence, it may be more difficult to determine which of the meanings is intended.

I can assure you that both are not typical in any part of this state

Does this mean

I can assure you that neither are typical in any part of this state

or does it mean

I can assure you that both are not typical in any part of this state. Maybe one or the other, but not both.

The former is more likely, but the latter is not unreasonable.

Confusion is also possible without a negative, but probably less common.

Solution 2:

Both should not be used in negative form. Both of them aren't good this is wrong Neither of them is good this is correct