Okay, here's what I do in such situations.
During the class, when everything is quiet, the teacher is talking and those two girls are talking Sh*t, Raise your hand. When the teacher calls on you, Say "Sir/Miss, ______ and ______ are being B*tches." that should shut them up. If they say anything...