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.

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

[2, 953, 175, 673, 853, 203, 275, 177, 617, 887, 803, 447, 322, 109, 991]
[2, 953, 673, 853, 617, 887, 109, 991]

[337, 510, 770, 17, 584, 159, 815, 584, 235, 590, 582, 2, 990, 299, 296, 948, 971, 367, 972]

[337, 17, 2, 971, 367]