Program FNG;
Uses crt;
Var x,y,z: int64;
Begin
Clrscr;
Write('Nhap x, y: '); Readln(x,y);
If sqr(x)+sqr(y)<=1 then Write('Z = ',sqr(x)+sqr(y));
If (sqr(x)+sqr(y)>1) and (y>=x) then Write('Z = ',x+y);
If (sqr(x)+sqr(y)>1) and (y<x) then Write('Z = 0.5');
Readln
End.