The conversation between human and AI assistant.
[|Human|] Divide the given set of numbers into prime and composite numbers.
[|AI|] In the given set of numbers [16, 31, 5, 9, 18], the prime numbers are [31, 5] and the composite numbers are [16, 9, 18].
[|Human|] 
Divide the given set of numbers into prime and composite numbers.