Consecutive non-primality P57148


Statement
 

pdf   zip

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.

Public test cases
  • Input

    1234
    436273033
    

    Output

    1234 436273010
    436273033 436273033
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Official solutions
    C++
    User solutions
    C++