#include <iostream>
using namespace std;

const int TEN = 10;
const int X = 77;

int main() {
	int n, res;
	cin >>n;
	if ((n % (TEN * TEN) == X) || ((n / TEN) % (TEN * TEN) == X) || (n / (TEN * TEN) == X)) {
		cout << "DA";
	} else {
		cout << "NU";
	}
	return 0;
}