c++
#include <iostream>
using namespace std;
int main()
{
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
if (a <= d and b <= e or a <= e and b <= d) {
cout << "YES";
}
else if (c <= d and b <= e or c <= e and b <= d) {
cout << "YES";
}
else if (c <= d and a <= e or c <= e and a <= d) {
cout << "YES";
}
else {
cout << "NO";
}
return 0;
}
python
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
if a <= d and b <= e or a <= e and b <= d:
print("YES")
elif c <= d and b <= e or c <= e and b <= d:
print("YES")
elif c <= d and a <= e or c <= e and a <= d:
print("YES")
else:
print("NO")
Объяснение:
var
a, b, c : real;
begin
read (a, b, c);
if (a = b) and (b = c) then writeln ('Равносторонний')
else if (a = b) or (a = c) or (b = c) then writeln ('Равнобедренный')
else if (sqr (a) + sqr (b) = sqr (c)) or (sqr (b) + sqr (c) = sqr (a)) or (sqr (a) + sqr (c) = sqr (b)) then writeln ('Прямоугольный')
else writeln ('No');
end.