def separate_positive_negative(A):
B = [x for x in A if x > 0] # Array B with positive elements
C = [x for x in A if x < 0] # Array C with negative elements
# Output size and content of array B
print(len(B))
print(" ".join(map(str, B)))
# Output size and content of array C
print(len(C))
print(" ".join(map(str, C)))
# Example usage
A = [1, -2, 3, -4, 5, -6, 7, 8, -9]
separate_positive_negative(A)