#include <bits/stdc++.h>
using namespace std;
bool hs(int n){
    bool l=0;
      
    {
        for(int j=2;j<n;j++){
            if(n%j==0){
            l=1;
            break;
            }   
        }
    if(n<2) l=0;    
    }
    return l;
}
int main(){
    int i;
    for(i=100;i<=999;i++){
        if(hs(i)&&hs(i/10)&&hs(i/100)){ 
            cout<<i<<endl;
        }   
    }
    return 0;
    }
 
/**************************************************************
	Problem: 1143
	User: chenlingxuan
	Language: C++
	Result: Accepted
	Time:14 ms
	Memory:2072 kb
****************************************************************/