#include <iostream>
#include <cmath>
using namespace std;
bool is_in_square(double x, double y)
{
return ((fabs(x)<=1)&&(fabs(y)<=1));
}
int main()
{
double x, y;
cin >> x >> y;
if (is_in_square(x,y)) cout << "YES";
else cout << "No";
return 0;
}
Пример:
0.5 -0.6
YES
Var a,b, d:integer;
begin
read (d);
a:=d div 100;
b:=d div 10 mod 10;
if a>b then Write ('перша більша') else Write ('друга більша')
end.