#include <iostream>
using namespace std;
int main() {
unsigned a,b,rasturnat=0;
//Citim date
cin >> a >> b;
//Construim rasturnatul lui a
while(a>0){
rasturnat = rasturnat*10 + a%10;
a=a/10;
}
//Comaram rasturnatul cu b
if(rasturnat==b) cout << "DA";
else cout << "NU";
}