fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c, d;
  6. cin >> a >> b >> c >> d;
  7. if ( a * b == c && b * c ==d && d/c == c/b && c/b == b/a) {
  8. cout << "DA";
  9. } else {
  10. cout << "NU";
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 5292KB
stdin
3 9 27 81
stdout
NU