fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. ios_base::sync_with_stdio(false);
  7. cin.tie(NULL);
  8.  
  9. long long x1, y1, x2, y2;
  10. long long x3, y3, x4, y4;
  11.  
  12. if (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4) {
  13. long long dx1 = x2 - x1;
  14. long long dy1 = y2 - y1;
  15. long long dx2 = x4 - x3;
  16. long long dy2 = y4 - y3;
  17.  
  18. long long tich = dx1 * dy2 - dy1 * dx2;
  19.  
  20. if (tich == 0) {
  21. cout << "DONG HA\n";
  22. } else {
  23. cout << "NAM ANH\n";
  24. }
  25. }
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty