#include<bits/stdc++.h>
using namespace std;
bool isPrime(int n) {
if(n <= 1) return false;
for(int i = 2; i <= sqrt(n); i++) {
if(n % i == 0) return false;
}
return true;
}
void printPrimes(int arr[], int n) {
for(int i = 0; i < n; i++) {
if(isPrime(arr[i])) {
cout << arr[i] << " la so nguyen to" << endl;
}
}
}
int main() {
int arr[] = {2, 3, 4, 5, 6, 7, 8, 9, 10};
int n = sizeof(arr) / sizeof(arr[0]);
printPrimes(arr, n);
return 0;
}