1)
int main()
{
int a;
cin>>a;
if(a/10000==a%10)
cout<<"DA";
else
cout<<"NU";
}
2)
int main()
{
int a,b;
cin>>a>>b;
a-=a%10;
b-=b%10;
if(a%100==b%100)
cout<<"DA";
else
cout<<"NU";}
3)
int main()
{
int x,y;
cin>>x>>y;
if(x%1000==y%1000)
cout<<"DA";
else
cout<<"NU";
}
4)
{ int a,b,c;
cin>>a;
if(a==a%100)
cout<<"DA"<<endl;
else
cout<<"NU"<<endl;
cin>>b;
if(b==b%100)
cout<<"DA"<<endl;
else
cout<<"NU"<<endl;
cin>>c;
if(c==c%100)
cout<<"DA"<<endl;
else
cout<<"NU"<<endl;
}