def decompose_two(p):
    """Decomposes p into p - 1 = q * 2^s
    
    Args:
        p: an integer representing a prime number
        
    Results:
        p: an integer representing q above
        k: an integer representing the exponent of 2

    """
    k = 0
    while p % 2 == 0:
        k += 1
        p //= 2
    return p, k