#include <iostream>
using namespace std;
void citire(int a[], int & n)
{
cin>>n;
for(int i = 0; i < n; ++i)
cin>>a[i];
}
bool crescator(int a[], int n)
{
for(int i = 1; i < n; ++i)
{
if(a[i - 1] > a[i]) return false;
}
return true;
}
int main()
{
int n, a[1000];
citire(a, n);
if(crescator(a, n))
cout<<"DA";
else
cout<<"NU";
}