How can I apply Rice's theorem?
Here's another, elementary proof technique that does not use Rice's theorem which is way overkill for this simple problem. 

We have Turing machine family $F(A)$ that goes into an infinite loop for any input except 2, in which case it will run program $A$, which can be arbitrary.

Now if we could decide your original problem we could decide for arbitrary inputless Turing machines whether they halt using $F$. But this is obviously undecidable and therefore your original problem is as well.