(X+Y)(X+Z)(Y+Z)+XYZ
=(X2+XY+XZ+YZ)(Y+Z)+XYZ
=(X2Y+XY2+XYZ+Y2Z+X2Z+XYZ+XZ2+YZ2)+XYZ
=(X2Y+X2Z+XYZ)+(Y2Z+XY2+XYZ)+(XZ2+YZ2+XYZ)
=X(XY+XZ+YZ)+Y(XY+XZ+YZ)+Z(XY+XZ+YZ)
=(X+Y+Z)(XY+XZ+YZ)
(X+Y)(X+Z)(Y+Z)+XYZ
=(X2+XY+XZ+YZ)(Y+Z)+XYZ
=(X2Y+XY2+XYZ+Y2Z+X2Z+XYZ+XZ2+YZ2)+XYZ
=(X2Y+X2Z+XYZ)+(Y2Z+XY2+XYZ)+(XZ2+YZ2+XYZ)
=X(XY+XZ+YZ)+Y(XY+XZ+YZ)+Z(XY+XZ+YZ)
=(X+Y+Z)(XY+XZ+YZ)