#include<bits/stdc++.h>
using namespace std;
using LL=long long;
#define IOS ios :: sync_with_stdio(false);

const int N = 1e3 + 10;

bool isprime(int x){
    for(int i=2;i<=sqrt(x);i++){
        if(x%i==0) return false;
    }
    return true;
}
bool hw(int x){
     int q=x%10*10+x/10;
     if(isprime(q)){
        return true;
     }
     return false;
}
int main(){
    for(int i=10;i<=100;i++){
        if(isprime(i)&&hw) cout<<i<<'\n';
    }
    
    return 0;
}