uses crt;
var a,b,c,kt:integer;
begin
clrscr;
write('nhap a='); readln(a);
write('nhap b='); readln(b);
write('nhap c='); readln(c);
if (a+b>c) and (a+c>b) and (b+c>a) then
begin
write('day la tam giac ');
kt:=0;
if ((a=b)and(a<>c)and(b<>c)) or ((b=c)and(b<>a)and(b<>c)) or ((a=c)and(a<>b)and(c<>b)) then kt:=1;
if (a=b) and (b=c) then kt:=2;
if (sqr(a)=sqr(b)+sqr(c)) or (sqr(b)=sqr(a)+sqr(c)) or (sqr(c)=sqr(a)+sqr(b)) then kt:=3;
if kt=0 then write('thuong');
if kt=1 then write('can');
if kt=2 then write('deu');
if kt=3 then write('vuong');
end
else writeln('day khong phai la tam giac');
readln;
end.
const esp = 0.00001;
var
a,b,c :real;
begin
readln (a,b,c);
if (a>=b+c) or(b>=a+c) or (c>=A+b) then writeln ('KHONGPHAITAMGIAC')
else
if (abs(a-b)<esp) and (abs(a-c)<esp) then writeln ('DEU')
else
if (abs(a*A-(B*B+C*C))<esp) and (abs(b-c)<esp) or ((abs(b*B-A*A-C*C)<esp) and (abs(a-c)<esp)) or ((abs(C*C-A*A-B*B)<esp) and (abs(b-a)<esp)) then writeln ('VUONG CAN')
else
if (abs(a-b)<esp) or (abs(b-c)<esp) or (abs(a-c)<esp) then writeln ('CAN')
else
if (abs(b*B-A*A-C*C)<esp) or (abs(c*C-b*B-A*A)<esp) or (abs(A*A-B*B-C*C)<esp) then writeln ('VUONG')
else
writeln ('THUONG');
readln
end.
uses crt;
var a,b,c,kt:integer;
begin
clrscr;
write('nhap a='); readln(a);
write('nhap b='); readln(b);
write('nhap c='); readln(c);
if (a+b>c) and (a+c>b) and (b+c>a) then
begin
write('day la tam giac ');
kt:=0;
if ((a=b)and(a<>c)and(b<>c)) or ((b=c)and(b<>a)and(b<>c)) or ((a=c)and(a<>b)and(c<>b)) then kt:=1;
if (a=b) and (b=c) then kt:=2;
if (sqr(a)=sqr(b)+sqr(c)) or (sqr(b)=sqr(a)+sqr(c)) or (sqr(c)=sqr(a)+sqr(b)) then kt:=3;
if kt=0 then write('thuong');
if kt=1 then write('can');
if kt=2 then write('deu');
if kt=3 then write('vuong');
end
else writeln('day khong phai la tam giac');
readln;
end.