#408
#include <iostream>
using namespace std;
int main()
{
int n, ogl=0, nd=0, d;
cin >> n;
while (n)
{
ogl=ogl*10+n%10; n/=10;
}
for (d=1; d*d<ogl; ++d)
{
if (ogl%d==0)
{
++nd; if (ogl/d!=d ) ++nd;
}
}
if (d*d==ogl) ++nd;
cout << nd << "\n";
return 0;
}
#1574
#include <iostream>
using namespace std;
int sumadiv(int x)
{
int sd=1, d;
for (d=2; d*d<x; ++d)
{
if (x%d==0)
{ sd+=d; sd+=x/d; }
}
if (d*d==x) sd+=d;
return sd;
}
int main()
{
int a, b;
cin >> a >> b;
if (sumadiv(a)==b && sumadiv(b)==a) cout << "PRIETENE";
else cout << "NU SUNT PRIETENE" << endl;
return 0;
}