In this task you will be given a list of integers. You should remove any integer that is not prime. A prime integer is an integer that is only divisible by '1' and itself. The output should be the list of prime numbers in the input list. If there are no primes in the input list an empty list ("[]") should be returned.

Q: [249, 791]

A: []
****
Q: [577, 941, 739, 367, 339, 607, 271, 299, 452, 523, 351, 307]

A: [577, 941, 739, 367, 607, 271, 523, 307]
****
Q: [985, 487, 719, 29, 475, 165, 866, 19, 523, 439, 979, 233, 13, 571, 839, 471, 109, 601]

A:
[487, 719, 29, 19, 523, 439, 233, 13, 571, 839, 109, 601]
****