class Complex {
    private double real;
    private double imag;
	public Complex()
	{
		this.real = 0;
		this.imag = 0;
	}
	public Complex(double real, double imag)
	{
		this.real = real;
		this.imag = imag;
	}
	public double getReal() 
	{
		return real;
	}
	public void setReal(double real)
	{
		this.real = real;
	}
	public double getImag() 
	{
		return imag;
	}
	public void setImag(double imag)
	{
		this.imag = imag;
	}
	public String toString()
	{
		return "(" + real + "," + imag + ")";
	}
}

class ComplexPropertyMain
{
 	public static void main(String[] args)
	{
        Complex c = new Complex(1,2);
        System.out.println("Liczba złożona:    " + c);
		System.out.println("   rzeczywista:    " + c.getReal());
		System.out.println("       urojona: " + c.getImag());
	}
}
