fork download
  1. #include <cstdio>
  2. #include <algorithm>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int a[3], b[3];
  9.  
  10. scanf("%d%d%d%d%d%d", a, a+1, a+2, b, b+1, b+2);
  11.  
  12. sort(a, a+3);
  13. sort(b, b+3);
  14.  
  15. puts(a[0]==b[0] && a[1]==b[1] && a[2]==b[2] ? "YES" : "NO");
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 4516KB
stdin
1 7 5
5 1 7
stdout
YES