Its nice you provided examples but I'm pretty sure you have one (maybe two) typos - one in row 2 (m2) and one in row 3 (m2)...otherwise your stated rule and the data don't agree.
Maybe the case for records 4 and 5 can be achieved by setting 2 restrictions:
Restriction 1: "m1 + m2" fields
Restriction 2: "m2 + m1" fields
But, is this a good approach?
Sure, two separate multi-column unique indexes and a row constraint that m1 != m2 would work. Whether its "good" depends greatly on how the model/data is going to be used.