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.

[909, 9, 174, 638, 676, 789, 93, 462, 970, 239, 496, 973, 797, 801, 332, 285, 310]
[239, 797]

[878, 277, 523, 164, 296, 731, 370, 139, 457, 777, 647]
[277, 523, 139, 457, 647]

[24, 859, 166, 209, 221, 955, 189, 491, 47, 367]

[859, 491, 47, 367]