#include
int main()
{
int n,m,sum;
scanf("%d",&n);
m=n*n*n;
for (int i=1;
i<=m/2;
i+=2)
{
sum=i;
for (int j=i+2;
j<=m;
j+=2)
{
sum+=j;
if (sum==m)
{
printf("%d*%d*%d=%d=",n,n,n,m);
for (i;
i<=j-2;
i+=2)
{
printf("%d+",i);
}
printf("%d\n",j);
}
if (sum>m)
{
break;
}
}
}
}