#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int h, j;
int isprime(int x)
{
for(int i = 2; i < x; i++)
{
if(x % i == 0)
return false;
}
return true;
}
int main()
{
cin >> a >> b;
for(int i = 0 ; i < b-a; i++)
{
c = a+i;
if(isprime(c))
{
h = c / 10;
j = c % 10;
c = j*10 + h;
if(isprime(c))
cout << a+i << endl;
}
}
return 0;
}
不知错在哪里QWQ