#include <iostream>
using namespace std;
int main()
{int n, c, m,x, ok=0;
cout<<"n="; cin>>n;
cout<<"c="; cin>>c;
m=n*n;
if(n==0 && c==0) ok=1;
while(m)
{x=m%10; m/=10;
if (c==m) ok=1;
}
if (ok) cout<<" contine";
else cout<<" nu contine";
return 0;
}