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