import java.util.* ;
import java.lang.* ;
import java.io.* ;
class Ideone
{
static double s1( double a1, double a2, double a3, double b1, double b2, double b3) { //Создаем функцию для нахождения стороны параллелепипеда
return Math .
sqrt ( ( a2
* b3
- a3
* b2
) * ( a2
* b3
- a3
* b2
) + ( a3
* b1
- a1
* b3
) * ( a3
* b1
- a1
* b3
) + ( a1
* b2
- a2
* b1
) * ( a1
* b2
- a2
* b1
) ) ; //Модуль векторного произведения }
{
Scanner in
= new Scanner
( System .
in ) ; double ax, ay, az, bx, by, bz, cx, cy, cz, sab, sac, sbc, s;
ax = in.nextDouble ( ) ;
ay = in.nextDouble ( ) ;
az = in.nextDouble ( ) ;
bx = in.nextDouble ( ) ;
by = in.nextDouble ( ) ;
bz = in.nextDouble ( ) ;
cx = in.nextDouble ( ) ;
cy = in.nextDouble ( ) ;
cz = in.nextDouble ( ) ;
sab = s1( ax, ay, az, bx, by, bz) ; //Поочередно вызываем функцию для каждой стороны
sac = s1( ax, ay, az, cx, cy, cz) ;
sbc = s1( bx, by, bz, cx, cy, cz) ;
s= ( ( ax== bx && ay== by && az== bz) || ( ax== cx && ay== cy && az== cz) || ( bx== cx && by== cy && bz== cz) ) ? ( sab+ sac+ sbc) : ( sab+ sac+ sbc) * 2 ; //Конечная формула площади полной поверхности параллелепипеда
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJc3RhdGljIGRvdWJsZSBzMShkb3VibGUgYTEsIGRvdWJsZSBhMiwgZG91YmxlIGEzLCBkb3VibGUgYjEsIGRvdWJsZSBiMiwgZG91YmxlIGIzKXsgLy/QodC+0LfQtNCw0LXQvCDRhNGD0L3QutGG0LjRjiDQtNC70Y8g0L3QsNGF0L7QttC00LXQvdC40Y8g0YHRgtC+0YDQvtC90Ysg0L/QsNGA0LDQu9C70LXQu9C10L/QuNC/0LXQtNCwCgkJcmV0dXJuIE1hdGguc3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