//1 2 3 //3 2 1 Boxes are equal //2 2 3 //3 2 1 The first box is larger than the second one //2 2 3 //3 2 3 The first box is smaller than the second one //3 4 5 //2 4 6 Boxes are incomparable procedure swp(var a,b: real); var tmp: real; begin tmp:=a; a:=b; b:=tmp; end; procedure srt(var a,b,c: real); begin if (a>b) then swp(a,b); if (a>c) then swp(a,c); if (b>c) then swp(b,c); end; // основная программа var a1,b1,c1,a2,b2,c2: real; priz: boolean; begin readln(a1,b1,c1); readln(a2,b2,c2); priz:=false; // сортируем размеры по возрастанию srt(a1,b1,c1); srt(a2,b2,c2); // проверяем на равенство if (a1=a2) and (b1=b2) and (c1=c2) then begin writeln('Boxes are equal'); priz:=true; end; // первая коробка больше второй if (a1+b1+c1)>(a2+b2+c2) then if (a1>=a2) and (b1>=b2) and (c1>=c2) then begin writeln('The first box is larger than the second one'); priz:=true; end; // если вторая больше первой if (a2+b2+c2)>(a1+b1+c1) then if (a2>=a1) and (b2>=b1) and (c2>=c1) then begin writeln('The first box is smaller than the second one'); priz:=true; end; // если все три случая не встретились, то коробки не совместимы if not priz then writeln('Boxes are incomparable'); end.