(a, b, A, B)
return n, e
r"""
    Kid RSA is a version of RSA useful to teach grade school children
    since it does not involve exponentiation.

    Alice wants to talk to Bob. Bob generates keys as follows.
    Key generation:

    * Select positive integers `a, b, A, B` at random.
    * Compute `M = a b - 1`, `e = A M + a`, `d = B M + b`, `n = (e d - 1)  /M`.
    * The *public key* is `(n, e)`. Bob sends these to Alice.
    * The *private key* is `d`, which Bob keeps secret.

    Encryption: If `m` is the plaintext message then the
    ciphertext is `c = m e \pmod n`.

    Decryption: If `c` is the ciphertext message then the
    plaintext is `m = c d \pmod n`.

    Examples
    ========

    >>> from sympy.crypto.crypto import kid_rsa_public_key
    >>> a, b, A, B = 3, 4, 5, 6
    >>> kid_rsa_public_key(a, b, A, B)
    (369, 58)
r"""
    Kid RSA is a version of RSA useful to teach grade school children
    since it does not involve exponentiation.
r Kid RSA is a version of RSA useful to teach grade school children since it does not involve exponentiation .
def kid_rsa_public_key(a, b, A, B):
    r"""
    Kid RSA is a version of RSA useful to teach grade school children
    since it does not involve exponentiation.

    Alice wants to talk to Bob. Bob generates keys as follows.
    Key generation:

    * Select positive integers `a, b, A, B` at random.
    * Compute `M = a b - 1`, `e = A M + a`, `d = B M + b`, `n = (e d - 1)  /M`.
    * The *public key* is `(n, e)`. Bob sends these to Alice.
    * The *private key* is `d`, which Bob keeps secret.

    Encryption: If `m` is the plaintext message then the
    ciphertext is `c = m e \pmod n`.

    Decryption: If `c` is the ciphertext message then the
    plaintext is `m = c d \pmod n`.

    Examples
    ========

    >>> from sympy.crypto.crypto import kid_rsa_public_key
    >>> a, b, A, B = 3, 4, 5, 6
    >>> kid_rsa_public_key(a, b, A, B)
    (369, 58)

    """
    M = S(a*b - 1)
    e = S(A*M + a)
    d = S(B*M + b)
    n = S((e*d - 1)//M)
    return n, e
def kid_rsa_public_key ( a , b , A , B ) : M = S ( a * b - 1 ) e = S ( A * M + a ) d = S ( B * M + b ) n = S ( ( e * d - 1 ) // M ) return n , e