Consecutive non-primality

For every natural number x, define N(x) as the smallest natural number y
such that y ≥ x and such that the 250 consecutive numbers
y, y + 1, …, y + 249 are all non-prime.

Your program must print N(x) for every given x.

Input

Input consists of several (probably many) natural numbers x, each one
such that N(x) < 10⁹.

Output

For every x, print x and N(x) in one line.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T11:25:27.923Z

© Jutge.org, 2006–2026.
https://jutge.org
