#C10468. Palprime Checker

    ID: 39676 Type: Default 1000ms 256MiB

Palprime Checker

Palprime Checker

You are given a non-negative integer \(N\). Your task is to determine whether \(N\) is a palprime, i.e. it is both a palindrome and a prime number.

A number is considered a palindrome if it reads the same forward and backward. Additionally, a prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

Return 1 if \(N\) is a palprime, otherwise return 0.

inputFormat

The input consists of a single line containing an integer \(N\) \( (0 \leq N \leq 10^9) \).

outputFormat

Output a single integer: 1 if \(N\) is a palprime, and 0 otherwise.

## sample
131
1