import java.util.Scanner;
public class Test1015
{
    public static void main (String[] args)
    {
        Scanner in=new Scanner(System.in);
        int x=in.nextInt();
        System.out.println("输入repeat次数:"+x);
        for (int i=1;i<=x ;i++ )
        {
            int a=in.nextInt();
            int b=in.nextInt();
            int c=in.nextInt();
            if((a+b>c)||(a+c>b)||(b+c>a))
            {
                double s=(a+b+c)/2;
                double area=s*(s-a)*(s-b)*(s-c);
                double perimeter=a+b+c;
                System.out.println("三角形的面积是:"+area+"\n"+"三角形的周长是:"+perimeter);
            }
        }
    }
}