#include <iostream>
#include <vector>
#include <string>
using namespace std;


int main() {
	int n, m;
	cin >> n >> m;
	
	vector <bool> v(m + 1, true);
	
	
	for (int i = 2; i * i <= m; i++) {
		if (v[i]) {
			for (int j = i * i; j <= m; j += i) {
				v[j] = false;
			}
		}
	}
	
	string res = "";
	
	for (int i = n; i <= m; i++) {
		if (v[i]) {
			res += to_string(i);
			res += "\n";
		}
	}
	
	if (res.length() > 0) {
		cout << res;
	} else {
		cout << "Absent";
	}
	
	
}