### PROBLEM LINK:

**Author:** ADMIN

**Editorialist:** SUSHANT AGARWAL

### DIFFICULTY:

SIMPLE

### PREREQUISITES:

Basic looping,Conditional statements

### PROBLEM:

You will be given an integer N, 1 ≤ N ≤ 1000000. You must find

the smallest integer M ≥ N such that M is a prime number and M is a

palindrome.

### EXPLANATION:

Check every odd number after N (using a loop) for 2 properties

1)It should be prime 2) The number should be equal to its reverse.

Print the first number that satisfies these 2 properties and then break out of the loop when this number is encountered.

### EDITORIALIST’S SOLUTION:

Editorialist’s solution can be found here.