#include<bits/stdc++.h>
using namespace std;
bool isprime(int n) {
if (n == 1) return false;
for (int i = 2; i <= n / i; i++)
if (n % i == 0)
return false;
return true;
}
int main() {
int x,y, sum = 0;
cin >> x>>y;
for (int i = x; i <= y; i++) {
if (isprime(i) ) {
cout <<i<<",";
}
}
return 0;
}