interface ShapeArea{
	abstract double getArea();
	abstract double getPerimeter();
}
class MyRectangle implements ShapeArea{
	double width;
	double height;
	MyRectangle(double w, double h){width = w; height = h;}
	public double getArea(){ return width*height;}
	public double getPerimeter(){	return 2 * (width+height);}
	public String toString(){
	        return "MyRectangle:width=:" + width + ",height=" + height+ ",perimeter=" + this.getPerimeter() + ",area=" + this.getArea();
	}
}
class MyTriangle implements ShapeArea{
	double a,b,c;
	MyTriangle(double a, double b, double c) { this.a = a; this.b = b; this.c = c; }
	public double getArea() { double s=(a+b+c)/2;return Math.sqrt(s*(s-a)*(s-b)*(s-c)); }
	public double getPerimeter() { return a+b+c; }
	public String toString(){
		return "MyTriangle:a=:" + a + ",b=" + b + ",c=" + c+",perimeter=" + this.getPerimeter() + ",area=" + this.getArea();
	}
}	
public class Test{
	public static void main(String args[]){
		MyRectangle rect = new MyRectangle(10, 8);
	    System.out.println(rect.toString());
	}
}
