Check prime problem

all cases are running fine but 3 case is giving runtime error

i have encountered the problem