fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define int long long
  4. double distance(double x1, double y1, double x2, double y2){
  5. return sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  6. }
  7. void sol(){
  8. double x, y, p, q;
  9. cin >> x >> y >> p >> q;
  10. if(distance(x, y, p, q) + distance(0, 0, p, q) == distance(0, 0, x, y)) cout << "No\n";
  11. else cout << "Yes\n";
  12. }
  13. signed main(){
  14. ios_base::sync_with_stdio(false);
  15. cin.tie(NULL);
  16. cout.tie(NULL);
  17. int t = 1;
  18. cin >> t;
  19. while(t--){
  20. sol();
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Yes