#include<stdio.h>
#include<stdbool.h>
bool heShu(int n){
	bool f = false;  //假设不是合数 
	int i;
	for(i = 2;i < n;i++){
		if(n % i == 0){
			f = true;
			break;
		}
	}
	if(n == 1){
		f = false;
	}
	return f;
}
int main(){
	int i;
	for(i = 100;i <= 999;i++){
		if(heShu(i) && heShu(i / 10) && heShu(i / 100)){
			printf("%d\n",i);
		}
	}
	return 0;
}
/**************************************************************
	Problem: 1143
	User: admin
	Language: C
	Result: Accepted
	Time:4 ms
	Memory:1036 kb
****************************************************************/