https://www.acmicpc.net/problem/1929
using System;
using System.Text;
class Program
{
static void Main() {
StringBuilder sb = new StringBuilder();
string[] s=Console.ReadLine().Split(' ');
int m=int.Parse(s[0]);
int n=int.Parse(s[1]);
for(int i=m;i<=n;i++){
int k=0;
if(i==1) k=1;
for(int j=2;j<=Math.Sqrt(i);j++){
if(i%j==0){
k=1;
break;
}
}
if(k==0) sb.Append(i+"\n");
}
Console.Write(sb.ToString());
}
}