#include <iostream>
using namespace std;
bool czy_pierwsza(int n) {
int d = 2;
while (d * d <= n) {
if (n % d == 0) {
cout << "Dzielnikiem liczby" << n << "jest np. " << d << endl;
return 0 ;
}
d += 1;
}
return 1;
}
int main() {
cout << "11" << czy_pierwsza(11) << endl;
cout << "71" << czy_pierwsza (71) << endl;
cout << "17391" << czy_pierwsza(17391) << endl;
cout << "17389" << czy_pierwsza(17389) << endl;
cout << "14509" << czy_pierwsza(14509) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpib29sIGN6eV9waWVyd3N6YShpbnQgbikgewogICAgaW50IGQgPSAyOwoJd2hpbGUgKGQgKiBkIDw9IG4pIHsKCSAgIGlmIChuICUgZCA9PSAwKSB7CgkgICAJY291dCA8PCAiRHppZWxuaWtpZW0gbGljemJ5IiA8PCBuIDw8ICJqZXN0IG5wLiAiIDw8IGQgPDwgZW5kbDsKCSAgIAlyZXR1cm4gMCA7CgkgICB9CiAgICAgICBkICs9IDE7Cgl9CglyZXR1cm4gMTsKfQppbnQgbWFpbigpIHsKCWNvdXQgPDwgIjExIiA8PCBjenlfcGllcndzemEoMTEpIDw8IGVuZGw7Cgljb3V0IDw8ICI3MSIgPDwgY3p5X3BpZXJ3c3phICg3MSkgPDwgZW5kbDsKCWNvdXQgPDwgIjE3MzkxIiA8PCBjenlfcGllcndzemEoMTczOTEpIDw8IGVuZGw7Cgljb3V0IDw8ICIxNzM4OSIgPDwgY3p5X3BpZXJ3c3phKDE3Mzg5KSA8PCBlbmRsOyAKCWNvdXQgPDwgIjE0NTA5IiA8PCBjenlfcGllcndzemEoMTQ1MDkpIDw8IGVuZGw7CglyZXR1cm4gMDsKCQp9