




import math
from itertools import permutations




def 					SCREAMING_SNAKE_CASE	(       __UpperCamelCase			:						int      )  ->							bool:

    if 1 < number < 4:
        # 2 and 3 are primes
        return True
    elif number < 2 or number % 2 == 0 or number % 3 == 0:
        # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
        return False

    # All primes number are in format of 6k +/- 1
    for i in range(5       ,     int(math.sqrt(__UpperCamelCase      ) + 1      )       ,     6      ):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True




def 					SCREAMING_SNAKE_CASE	(       __UpperCamelCase			:						int       ,     __UpperCamelCase			:						list      )  ->							bool:
    UpperCAmelCase_ ,							UpperCAmelCase_							 =     0, len(__UpperCamelCase      ) - 1
    while left <= right:
        UpperCAmelCase_							 =     (left + right) // 2
        if prime_list[middle] == target:
            return True
        elif prime_list[middle] < target:
            UpperCAmelCase_							 =     middle + 1
        else:
            UpperCAmelCase_							 =     middle - 1

    return False




def 					SCREAMING_SNAKE_CASE	(       )  ->							int:
    UpperCAmelCase_							 =     [n for n in range(1001       ,     1_0000       ,     2      ) if is_prime(__UpperCamelCase      )]
    UpperCAmelCase_							 =     []

    for number in prime_list:
        UpperCAmelCase_							 =     []

        for prime_member in permutations(list(str(__UpperCamelCase      )      )      ):
            UpperCAmelCase_							 =     int(''''''.join(__UpperCamelCase      )      )

            if prime % 2 == 0:
                continue

            if search(__UpperCamelCase       ,     __UpperCamelCase      ):
                tmp_numbers.append(__UpperCamelCase      )

        tmp_numbers.sort()
        if len(__UpperCamelCase      ) >= 3:
            candidates.append(__UpperCamelCase      )

    UpperCAmelCase_							 =     []
    for candidate in candidates:
        UpperCAmelCase_							 =     len(__UpperCamelCase      )
        UpperCAmelCase_							 =     False

        for i in range(__UpperCamelCase      ):
            for j in range(i + 1       ,     __UpperCamelCase      ):
                for k in range(j + 1       ,     __UpperCamelCase      ):
                    if (
                        abs(candidate[i] - candidate[j]      )
                        == abs(candidate[j] - candidate[k]      )
                        and len({candidate[i], candidate[j], candidate[k]}      ) == 3
                    ):
                        passed.append(
                            sorted([candidate[i], candidate[j], candidate[k]]      )      )
                        UpperCAmelCase_							 =     True

                    if found:
                        break
                if found:
                    break
            if found:
                break

    UpperCAmelCase_							 =     set()
    for seq in passed:
        answer.add(''''''.join([str(__UpperCamelCase      ) for i in seq]      )      )

    return max(int(__UpperCamelCase      ) for x in answer      )


if __name__ == "__main__":
 print(solution())











import math

import qiskit
from qiskit import Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute




def 					SCREAMING_SNAKE_CASE	(       __UpperCamelCase			:						int = 1       ,     __UpperCamelCase			:						int = 1      )  ->							qiskit.result.counts.Counts:
    if isinstance(__UpperCamelCase       ,     __UpperCamelCase      ) or isinstance(__UpperCamelCase       ,     __UpperCamelCase      ):
        raise TypeError('''inputs must be integers.'''      )
    if (bit_a < 0) or (bit_a < 0):
        raise ValueError('''inputs must be positive.'''      )
    if (math.floor(__UpperCamelCase      ) != bit_a) or (math.floor(__UpperCamelCase      ) != bit_a):
        raise ValueError('''inputs must be exact integers.'''      )
    if (bit_a > 1) or (bit_a > 1):
        raise ValueError('''inputs must be less or equal to 1.'''      )

    # build registers
    UpperCAmelCase_							 =     QuantumRegister(2       ,     '''qr'''      )
    UpperCAmelCase_							 =     ClassicalRegister(2       ,     '''cr'''      )

    UpperCAmelCase_							 =     QuantumCircuit(__UpperCamelCase       ,     __UpperCamelCase      )

    # entanglement the qubits
    quantum_circuit.h(1      )
    quantum_circuit.cx(1       ,     0      )

    # send the information
    UpperCAmelCase_							 =     str(__UpperCamelCase      ) + str(__UpperCamelCase      )

    if c_information == "11":
        quantum_circuit.x(1      )
        quantum_circuit.z(1      )
    elif c_information == "10":
        quantum_circuit.z(1      )
    elif c_information == "01":
        quantum_circuit.x(1      )
    else:
        quantum_circuit.i(1      )

    # unentangled the circuit
    quantum_circuit.cx(1       ,     0      )
    quantum_circuit.h(1      )

    # measure the circuit
    quantum_circuit.measure(__UpperCamelCase       ,     __UpperCamelCase      )

    UpperCAmelCase_							 =     Aer.get_backend('''aer_simulator'''      )
    UpperCAmelCase_							 =     execute(__UpperCamelCase       ,     __UpperCamelCase       ,     shots=1000      )

    return job.result().get_counts(__UpperCamelCase      )


if __name__ == "__main__":
 print(F"Counts for classical state send: {superdense_coding(1,1)}")





