fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int t;
  6. cin >> t;
  7. while(t--){
  8. int a, b, c, d;
  9. cin>>a>>b>>c>>d;
  10. if(a==b && a==c && a==d){
  11. cout<<"YES"<<endl;
  12. }
  13. else{
  14. cout<<"NO"<<endl;
  15. }
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5320KB
stdin
7
1 2 3 4
1 1 1 1
2 2 2 2
1 2 1 2
1 1 5 5
5 5 5 5
4 10 5 9
stdout
NO
YES
YES
NO
NO
YES
NO