Having covered addition, Xyene's teacher moves on to something much more challenging - analytical geometry. Once again out of his depth, Xyene approaches you for help with his homework.
For today's homework, Xyene has () triangles. Each triangle is defined by the points , , (). His task is to calculate both the area () and perimeter () of the triangle . A difficult task indeed, but thankfully he has you to help! Do Xyene's homework for him so he doesn't have to.
One line containing , the number of triangles to follow. The next lines contain 6 integers separated by single spaces: of each .
lines, containing and to at least 2 decimal places separated by a single space.
1 0 0 0 1 1 1