#include <cmath>
class PrimeNumberGenerator {
public:
int current;
explicit PrimeNumberGenerator(int start) {
if (start != 1) {
current = start;
} else {
current = start + 1;
}
}
int GetNextPrime() {
bool isPrime = false;
bool isNotPrime = false;
while (!isPrime) {
for (int i = 2; i < std::sqrt(current); i++) {
if (current % i == 0) {
isNotPrime = true;
break;
}
}
if (isNotPrime) {
isNotPrime = false;
current++;
} else { isPrime = true; }
}
return current++;
}
};