#include <iostream>
using namespace std;
const int THOUSAND = 1000;
const int SPECIAL_NUM = 111;
int main() {
int n;
cin >> n;
if (n % THOUSAND == SPECIAL_NUM) {
cout << "DA";
} else {
cout << "NU";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IFRIT1VTQU5EID0gMTAwMDsKY29uc3QgaW50IFNQRUNJQUxfTlVNID0gMTExOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWNpbiA+PiBuOwoJaWYgKG4gJSBUSE9VU0FORCA9PSBTUEVDSUFMX05VTSkgewoJCWNvdXQgPDwgIkRBIjsKCX0gZWxzZSB7CgkJY291dCA8PCAiTlUiOwoJfQoJcmV0dXJuIDA7Cn0=