#include <stdio.h>

struct complex {
	double re;
	double im;
};

void complex_add(struct complex a, struct complex b, struct complex *c)
{
	(*c).re = a.re + b.re;
	(*c).im = a.im + b.im;
}

void complex_mul(struct complex a, struct complex b, struct complex *c)
{
	(*c).re = a.re * b.re - a.im * b.im;
	(*c).im = a.re * b.im + a.im * b.re;
}

void complex_print(struct complex a)
{
	printf("(%f)+(%f)i", a.re, a.im);
}

int main(void)
{
	struct complex x, y, tmp;

	scanf("%lf", &(x.re));
	scanf("%lf", &(x.im));

	complex_mul(x, x, &tmp);
	complex_add(tmp, x, &y);

	complex_print(y);
	printf("\n");

	return 0;
}
