Find the center of gravity of the cube that is determined by the inequalities

0<or = x<=1 , 0<or = y<=1, 0<or = z<=1 if

a) the density is proportional to the square of the distance to the origin.

b) the density is proportional to the sum of the distances to the faces that lie in the coordinates planes.