#include <iostream>
using namespace std;
int main()
{
int i,n,a,b,kt,j;
cout<<"a="; cin>>a;
cout<<"b="; cin>>b;
for (i=a; i<=b; i++)
{
if (i>2)
{
kt=0;
for (j=2; j<=i-1; j++)
if (i%j==0) kt=1;
if (kt==0) cout<<i<<" ";
}
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,f;
cin>>a>>b;
if (a==1) a++;
for (int i=a ;i<=b ;i++)
{
f=0;
for (int e=2;e<=sqrt(i);e++)
{
if ( i%e==0)
{
f=1;
break;
}
}
if (f==0) cout<<i<<endl;
}
return 0;
}