#include <bits/stdc++.h>
int x, y , s1 , s2 , i;
using namespace std;
int main()
{
cin >> x >> y;
for (i = 1; i * i < x; i ++)
if (x % i == 0) s1 = s1 + i + x / i;
if (i * i == x) s1 = s1 + i;
for (i = 1; i * i < y; i ++)
if (y % i == 0) s2 = s2 + i + y / i;
if (i * i == y) s2 = s2 + i;
if (s1 - x == y && s2 - y == x) cout << "PRIETENE";
else cout << "NU SUNT PRIETENE";
return 0;
}