Magnetotelluric response on inhomogeneous layered earth