Output nearby primes Write a program which takes an input (which may or may not be prime), and lists the immediate prime following and preceding it.

Example input:

1259


Example output:

1249 1277


Shortest program wins. Must execute within 10 seconds on a modern desktop PC. Inputs will be limited to 10,000 maximum.
Mathematica, 19

#~NextPrime~{-1,1}&amp;