Consecutive non-primality

For every natural number xx, define N(x)N(x) as the smallest natural number yy such that yxy \ge x and such that the 250 consecutive numbers y,y+1,,y+249y, y + 1, \dots, y + 249 are all non-prime.

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

Input

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

Output

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

Problem information

Author: Salvador Roura

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

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