Original: This is equivalent to the problem of deciding, given a program and an input, whether the program will eventually halt when run with that input, or will run forever.
Simplified: This is clearly impossible and was used by Alan Turing in 1936 to prove that there is no algorithm that can do it for all cases.