#include <stdio.h>

struct complex {
	double re;
	double im;
};

struct complex complex_add(struct complex a, struct complex b)
{
	struct complex c;

	c.re = a.re + b.re;
	c.im = a.im + b.im;

	return c;
}

struct complex 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;

	return c;
}

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));

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

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

	return 0;
}
