#include <iostream>
using namespace std;
int main()
{
int n,k,ok=0;
cin>>n>>k;
while (n>0)
if (n%10>k) ok++;
n=n/10;
}
if (ok==0) cout<<"DA";
else cout<<"NU";
return 0;