blob: 80feb29f5c4748bb3f4f0a45b73143de58a84fd0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
uses strutils, clib;
var
n, u: int64;
s: string;
code: word;
begin
readln(n);
str(n, s);
val(reversestring(s), u, code);
if isprime(n) and
isprime(u) then
writeln('YES')
else
writeln('NO')
end.
|