cases (M<=13, gcd(A,B,M)=1, 0<B<A<M): 262 ; one family: 115 ; two families: 147 ; mismatches: 0
