def queens_constraint(A, a, B, b):
 if (A == B):
  return True
 return ((a != b) and ((A + a) != (B + b)) and ((A - a) != (B - b)))

def queens_constraint ( A , a , B , b ) : if ( A == B ) : return True return ( ( a != b ) and ( ( A + a ) != ( B + b ) ) and ( ( A - a ) != ( B - b ) ) )
constraint is satisfied if its the same column .