The concentration of solid or liquid is Number of molesvolume in L=MassVolume×molar mass=DensityMolar mass.
At constant temperature, the density and molar mass of pure solid and liquid are constant.
Due to this, their molar concentrations are constant and are not included in the equilibrium constant.