



"""simple docstring"""





def        a__     (				lowerCAmelCase__     ,      lowerCAmelCase__				):
      while a != 0:
            UpperCAmelCase_			,   UpperCAmelCase_      			=							b % a, a
      return b


def        a__     (				lowerCAmelCase__     ,      lowerCAmelCase__				):
      if gcd(lowerCAmelCase__     ,      lowerCAmelCase__				) != 1:
            UpperCAmelCase_      			=							f"""mod inverse of {a!r} and {m!r} does not exist"""
            raise ValueError(lowerCAmelCase__				)
      UpperCAmelCase_			,   UpperCAmelCase_			,   UpperCAmelCase_      			=							1, 0, a
      UpperCAmelCase_			,   UpperCAmelCase_			,   UpperCAmelCase_      			=							0, 1, m
      while va != 0:
            UpperCAmelCase_      			=							ua // va
            UpperCAmelCase_			,   UpperCAmelCase_			,   UpperCAmelCase_			,   UpperCAmelCase_			,   UpperCAmelCase_			,   UpperCAmelCase_      			=							(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
      return ua % m









"""simple docstring"""





from maths.prime_check import is_prime
def        a__     (				lowerCAmelCase__				):
      if not isinstance(lowerCAmelCase__     ,      lowerCAmelCase__				):
            UpperCAmelCase_      			=							f"""Input value of [number={number}] must be an integer"""
            raise TypeError(lowerCAmelCase__				)
      if is_prime(lowerCAmelCase__				) and is_prime(number + 2				):
            return number + 2
      else:
            return -1


if __name__ == "__main__":
  import doctest

  doctest.testmod()




