From 1a8e1e68759611a66ae116771da5f376c95a3b9f Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sun, 12 Feb 2017 16:18:20 +0700 Subject: Update others/volume1 --- others/volume1/023.pas | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 others/volume1/023.pas (limited to 'others/volume1/023.pas') diff --git a/others/volume1/023.pas b/others/volume1/023.pas new file mode 100644 index 0000000..6092889 --- /dev/null +++ b/others/volume1/023.pas @@ -0,0 +1,17 @@ +uses strutils, cmath; + +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. -- cgit 1.4.1